There is no such thing as ISP cache, only your browser's cache, but I think
I understand what's happening now.  When you put in the request to open the
page (ie "yourscript.php"), instead of executing the script, you're seeing
the associated data from your browsers cache.  The request is never sent to
the server and the script is never executed.  That's why you are confused
about where the cached page is coming from.  :-)

Adding the following lines to the top of your script should do the trick
(note these must be parsed before *any* output)..

header("Expires: Mon, 01 Jan 1997 00:00:00 GMT");
header("Cache-Control: no-store, no-cache, must-revalidate");
header("Pragma: no-cache");

What these will do is tell the browser not to cache the page so
"yourscript.php" will never be associated with a cache file.  It's not 100%
effective becuase some browsers do not see these headers but it'll work for
the most part.  Hope this helps.  Good luck.


----- Original Message -----
Sent: Monday, August 19, 2002 4:27 PM
Subject: Re: [PHP] fopen(http:...) problems

> > Is there a cacheing mechanism involving PHP scripts?  I don't see how
> > possible to fopen() data from the browser's cache.  If you are not
> > the latest version of the web page then perhaps the server you are
> to
> > scrape is cloaking your spider.  Just a thought.
> I suspect it is cause by my ISP's cache. The reason I say this is that if
> refresh the page using my browser first and then access the page with the
> PHP script I get the most recent update. There has to be away to refresh
> cache (page) before using an fopen. Suggestions?
> syl
> --
> PHP General Mailing List (
> To unsubscribe, visit:

PHP General Mailing List (
To unsubscribe, visit:

Reply via email to