fopen problem

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
alanshen209
Forum Newbie
Posts: 2
Joined: Wed May 17, 2006 7:06 pm

fopen problem

Post by alanshen209 »

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
Post Reply