RE: [PHP] Upload alert

2002-04-08 Thread Rick Emery

What you're seeking is push technology.  I'm not certain that PHP can
provide that.

However, PHP can email you using the mail() function

-Original Message-
From: Rodolfo Silva [mailto:[EMAIL PROTECTED]]
Sent: Monday, April 08, 2002 12:16 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Upload alert


Hi! 

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? 

Tks in advance, 
Rodolfo Silva 

-- 
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] Upload alert

2002-04-08 Thread Miguel Cruz

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


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




RE: [PHP] Upload alert

2002-04-08 Thread Rance Hall

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


-- 
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] Upload alert

2002-04-08 Thread Miguel Cruz

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


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