sggoyal Posted July 17, 2008 Share Posted July 17, 2008 Warning: file_get_contents(http://my_url/index.php?t=trans&o=1&s=2008-07-17%2000: 00:00&e=2008-07-17%2023:59:59) [function.file-get-contents]: failed to open stream: HTTP request failed! in /file.php on line 393 Link to this page When I select more data means when I select s=2008-07-17%2000:00:00&e=2008-07-17%2010:59:59 it work properly I also use urlencode() but error remains i.e $res = file_get_contents(http://my_url/index.php?t=trans&o=1&s=2008-07-17%2000: 00:00&e=2008-07-17%2023:59:59); $res = urlencode($res); But When I click over url:-http://my_url/index.php?t=trans&o=1&s=2008-07-17%2000: 00:00&e=2008-07-17%2023:59:59 it open & my result show. Link to comment https://forums.phpfreaks.com/topic/115175-warning-file_get_contents/ Share on other sites More sharing options...
sKunKbad Posted July 17, 2008 Share Posted July 17, 2008 You might check that your php.ini has allow_url_fopen set to on. Also, if this is your own server, you might check that your /etc/resolv.conf, /etc/hosts, or DNS is otherwise properly configured. Link to comment https://forums.phpfreaks.com/topic/115175-warning-file_get_contents/#findComment-592248 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.