sometimes it works sometimes it results in error
Posted: Wed Nov 23, 2005 4:16 pm
Some times this scirpt will work, other times it returns an error:
Here is the error:
Warning: file_get_contents(http://site/xml_feed.php): failed to open stream: HTTP request failed! in /usr/home/public_html/test.php on line 7
It seems to work everyother time it is loaded. Is that a coincidence?
Any suggestions
Code: Select all
<?php
set_time_limit(0);
$url = 'http://site/xml_feed.php';
$page = file_get_contents($url);
print $page;
?>Warning: file_get_contents(http://site/xml_feed.php): failed to open stream: HTTP request failed! in /usr/home/public_html/test.php on line 7
It seems to work everyother time it is loaded. Is that a coincidence?
Any suggestions