i use file_get_contents() to get dinamic data.
here is my script…
$str = file_get_contents("http://cba.am/");
some script here...
it works fine for a long time, but now it returns Connection timed out.
and what is strange, when i run the script from local server, it works fine.
could you tell me why, and what can i do, to solve this.
maybe i must set the higher timeout time in php.ini?
Thanks
Try to extend script execution time by putting below line on top of your script:
Update:
When I added
wwwto url, it worked: