RE: [PHP] Scheduled event
| From: | Kath | Date: | Fri, 12 Oct 2001 11:21:12 +0000 |
| Subject: | RE: [PHP] Scheduled event | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-70915@lists.php.net to get a copy of this message | ||
Ah, a holy grail of PHP: regular events.
My advice, schedule a cron job for everyday at 8am for lynx to go to a
certain page.
On that page, find the current date and parse it down to the mm-dd-yyyy.
Then query your db versus that information and voila :)
Now you could say just "Happy Birthday, Torkil!" or be spiffy and subtract
the years and say: "Happy 85th Birthday, Torkil!"
Of course that would require more code, as you need to make the distinction
between x1st (like 21st) or z2nd (like 52nd) or x3rd (93rd) and the rest
with xth (4th, 5th, 6th and so on). :)
- k
-----Original Message-----
From: Torkil Johnsen [mailto:torkil.johnsen@stud.hibo.no]
Sent: Friday, October 12, 2001 7:03 AM
To: php-general@lists.php.net
Subject: [PHP] Scheduled event
Hello...
I've set up a members database, and I want to make a useless function that
sends out email to people when they have their birthdays. For example: My
birthday is feb 20th. So at precisely 8am that day, an email is sent out to
congratulate me.
Anyone know how to make this work in PHP? I am guessing I might have to make
use of something other than php as well, eh?
Sincerely,
Torkil
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
For additional commands, e-mail: php-general-help@lists.php.net
To contact the list administrators, e-mail: php-list-admin@lists.php.net