Re: Upload alert

From: Date: Mon, 08 Apr 2002 17:45:05 +0000
Subject: Re: Upload alert
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-92092@lists.php.net to get a copy of this message
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 nutshell: $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. miguel

« previous php.general (#92092) next »