|
Posted by grimrob on 10/11/63 11:59
I am looping round different URLs and reading in the contents of each
URL. My URLs are all valid, but for some reason I am getting an error
at a random point. I though maybe it could be timing out. I have used
$php_errormsg to try and find what the problem is, but it doesn't show
anything. Here's a code fragment:
echo "$page<br>";
stream_set_timeout($handle, 600); // 600-second timeout
echo "OPEN ";
$handle = fopen($page, "rb") or die($php_errormsg);
echo "SESAME<br>";
$contents = stream_get_contents($handle) or die($php_errormsg);
fclose($handle) ;
I just get my page followed by OPEN with no SESAME. So I know the fopen
is failing, but how can I find what is wrong?
Navigation:
[Reply to this message]
|