Hi all,
I'm using fopen to grab/read a url(content of) and simply display that content..
The reason I use fopen is because I want to display that url content as well as various other things on a page.
You can take a look at my script :
$file = fopen ("http://www.oicexchange.com/?tpl_id=127","r");
$filecontent = fread($file, 900000);
fclose($file);
echo ($filecontent);
The content is displayed fine. My problem exist, not always but it keep occuring, when :
1) I refresh the page
2) I went back to the page from somewhere else
This is the error message I got :
Warning: fopen("http://www.oicexchange.com/?tpl_id=127", "r") - Success in /home/oicnet/oicnetworks-www/hasni/fopenscript.php on line 6
Warning: Supplied argument is not a valid File-Handle resource in /home/oicnet/oicnetworks-www/hasni/fopenscript.php on line 7
Warning: Supplied argument is not a valid File-Handle resource in /home/oicnet/oicnetworks-www/hasni/fopenscript.php on line 8
I have no clue why this happens. I'd appreciate any help.
If anybody wants to see the example, use this link :
http://www.oicnetworks.com/hasni/fopenscript.php - try to refresh it a few times and you'll see what i mean.
Thanks again.