fopen problem
Posted: Wed May 17, 2006 7:12 pm
Hi all,
I have a piece of php code to read an xml file from other site. the code like this:
<?php
$url="http://www.php.net";
$xhtml = '';
if($filehandle = @fopen($url, 'rb')) {
$xhtml = fread($filehandle, 4096);
fclose($filehandle);
echo "$xhtml";
}
?>
and the code works for most of the linux server. but for one site, the result always the same. that means the result can not change even I change the site to generate the xml content. it seems the result xml is from the cache of the server. I don;t have the permission to check the server. I try to use no-cache header to by pass it, it doesn't work!!
Please help me out of this!!
Thanks a lot in advance!!
Alan
I have a piece of php code to read an xml file from other site. the code like this:
<?php
$url="http://www.php.net";
$xhtml = '';
if($filehandle = @fopen($url, 'rb')) {
$xhtml = fread($filehandle, 4096);
fclose($filehandle);
echo "$xhtml";
}
?>
and the code works for most of the linux server. but for one site, the result always the same. that means the result can not change even I change the site to generate the xml content. it seems the result xml is from the cache of the server. I don;t have the permission to check the server. I try to use no-cache header to by pass it, it doesn't work!!
Please help me out of this!!
Thanks a lot in advance!!
Alan