I assumed the web site was somewhere else; if it's on his own server,
wouldn't he already know that it was changed?
On Mon, 8 Apr 2002, Rance Hall wrote:
> why couldnt you just do this
> $checksum = md5(implode('', file('/path/to/file')));
> then it would only warn you about change in the code pre-parse, rather than
>post-parse as miguel suggested?
> Rance Hall
> Internal Office Extensions: 2455 or 6655
> PC Programmer, The Buckle, Inc.
> [EMAIL PROTECTED]
> -----Original Message-----
> From: Miguel Cruz [mailto:[EMAIL PROTECTED]]
> Sent: Monday, April 08, 2002 12:45 PM
> To: Rodolfo Silva
> Cc: [EMAIL PROTECTED]
> Subject: Re: [PHP] Upload alert
> On Mon, 8 Apr 2002, Rodolfo Silva wrote:
> > I need a php script to alert me (with a pop up window or something like
> > that) when a certain web page is modified. Is it possible? Where can I
> > find that?
> I don't know where you can find it pre-made, but it's pretty simple. In a
> $checksum = md5(implode('', file('http://www.whatever.org/')));
> That'll give you a 32-character string.
> Save $checksum in a database or in a local file.
> Repeat as often as you need to (using cron or whatever). Compare the new
> value against the one you saved. If they don't match, the page changed.
> NB: This will catch ANY change in the page. If that page is set up to show
> the current date, for instance, then that will be picked up as a change
> every day. If you need to deal with something like this, you're going to
> have to analyze and parse the page.
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php