Hi peeps. I have a script which looks like:
PHP Code:
$contents = file_get_contents($url);
preg_match("#<a href=\"(.+?)\">${tagcrap}post${tagcrap}to${tagcrap}classifieds${tagcrap}#",$contents,$matches) or die("#<a href=\"(.+?)\">${tagcrap}post${tagcrap}to${tagcrap}classifieds${tagcrap}#");
$newurl = $matches[1];
$newcontents = file_get_contents($newurl);
echo $newcontents;
Now, it all works until
PHP Code:
$newcontents = file_get_contents($newurl);
I can't tell you the usual value of $newurl because its a very well known website, as well as client-programmer issues.
anyway, the error i get it:

Originally Posted by
the script
Warning: file_get_contents(): HTTP request failed! <Ēk in --scriptpath-- on line 24
Warning: file_get_contents(--url here--): failed to open stream: No error in --scriptpath-- on line 24
Line 24 is shown above.
Can anyone tell me why this happens?
Bookmarks