By Norvert John Abella


2014-08-08 14:53:57 8 Comments

I have a php script that will return a google search but it gives me the HTTP error.

  if (strstr(file_get_contents("http://www.google.com/search?q=site:http://". $url ."&gws_rd=ssl"), 'did not match any documents.')) 
{
  return "No";
}

else {

    return "Yes";

}
A PHP Error was encountered

Severity: Warning

Message: file_get_contents(http://www.google.com/search?q=site:http://google.com&gws_rd=ssl): failed to open stream: HTTP request failed! HTTP/1.0 503 Service Unavailable

Filename: libraries/google_index.php

Line Number: 8

error : HTTP request failed! HTTP/1.0 503 Service Unavailable. how can i force this or something so it will get the contents.

Related Questions

Sponsored Content

36 Answered Questions

[SOLVED] Reference - What does this error mean in PHP?

19 Answered Questions

11 Answered Questions

16 Answered Questions

2 Answered Questions

[SOLVED] file_get_contents and error codes

4 Answered Questions

3 Answered Questions

[SOLVED] file_get_contents throws 400 Bad Request error PHP

1 Answered Questions

[SOLVED] 503 Service Unavailable on Google Search

  • 2015-08-03 19:50:17
  • wadhwasahil
  • 1027 View
  • 0 Score
  • 1 Answer
  • Tags:   php

Sponsored Content