Re: [PHP] fopen(http:...) problems

2002-08-19 Thread Kevin Stone

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)..



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.

-Kevin

- Original Message -
From: "Syl" <[EMAIL PROTECTED]>
To: "PHP General" <[EMAIL PROTECTED]>
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
it's
> > possible to fopen() data from the browser's cache.  If you are not
getting
> > the latest version of the web page then perhaps the server you are
trying
> 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
I
> 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
the
> cache (page) before using an fopen. Suggestions?
>
> syl
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] fopen(http:...) problems

2002-08-19 Thread Syl

> Is there a cacheing mechanism involving PHP scripts?  I don't see how it's
> possible to fopen() data from the browser's cache.  If you are not getting
> the latest version of the web page then perhaps the server you are trying
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 I
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 the
cache (page) before using an fopen. Suggestions?

syl


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] fopen(http:...) problems

2002-08-19 Thread Kevin Stone

Is there a cacheing mechanism involving PHP scripts?  I don't see how it's
possible to fopen() data from the browser's cache.  If you are not getting
the latest version of the web page then perhaps the server you are trying to
scrape is cloaking your spider.  Just a thought.
-Kevin

- Original Message -
From: "Syl" <[EMAIL PROTECTED]>
To: "PHP Windows" <[EMAIL PROTECTED]>; "PHP General"
<[EMAIL PROTECTED]>
Sent: Monday, August 19, 2002 3:13 PM
Subject: [PHP] fopen(http:...) problems


> When I use fopen(http:...) I do not get the latest version of the web page
> want to extract some content from. This page is updated at the source once
> an hour. How can I issue the equivalent of a Ctrl-F5 to refresh the cache?
>
> Syl
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php