Warning while using file_get_contents
I used the following code.
$homepage = file_get_contents('http://www.google.co.in/'); echo $homepage;
But it display the following warning message
Warning: file_get_contents(http://www.google.co.in/) [function.file-get-contents]: failed to open s开发者_如何学运维tream: HTTP request failed! in /home/web/cron/sample.php on line 47
- Check setting in php.ini allow_url_fopen
- Check your DNS settings.
- Check firewall settings
精彩评论