mitya
11-03-2003, 07:25 AM
No matter how hard I try I cannot return the content of a remote source using:
$resource = "http://www.somesite.com/page.html";
$pointer = fopen($resource, "r"); //also tried "rb"
$contents = fread($pointer, filesize($resource);
echo $contents;
I have allow_url_fopen set to ON in my php.ini file so I really can't see the problem.
I know it can be done, i.e. return the code of another page (it's an innocent intent), but I cannot get it to work.
Any help greatly appreciated. Cheers.
$resource = "http://www.somesite.com/page.html";
$pointer = fopen($resource, "r"); //also tried "rb"
$contents = fread($pointer, filesize($resource);
echo $contents;
I have allow_url_fopen set to ON in my php.ini file so I really can't see the problem.
I know it can be done, i.e. return the code of another page (it's an innocent intent), but I cannot get it to work.
Any help greatly appreciated. Cheers.