RE: [PHP] Upload alert
| From: | Miguel Cruz | Date: | Mon, 08 Apr 2002 18:03:23 +0000 |
| Subject: | RE: [PHP] Upload alert | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-92099@lists.php.net to get a copy of this message | ||
I assumed the web site was somewhere else; if it's on his own server,
wouldn't he already know that it was changed?
miguel
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
> 308.238.2455
> Internal Office Extensions: 2455 or 6655
> PC Programmer, The Buckle, Inc.
> rance.hall@buckle.com
>
>
> -----Original Message-----
> From: Miguel Cruz [mailto:mnc@stoic.net]
> Sent: Monday, April 08, 2002 12:45 PM
> To: Rodolfo Silva
> Cc: php-general@lists.php.net
> 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
> 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
>
>
>