Re: [PHP] Event Handling

[email protected] (Jochem Maas)
Newsgroups php.general
Message-ID <[email protected]>
Op 3/15/10 8:24 AM, Midhun Girish schreef:
> Hi ,
> Just as David Hutto has said,What you need is the cronjob... Make a script
> say "check.php" which checks the db to see if any new entries are made...
> and if yes send the mail ...
> 
> now using the cronjob feature in linux os(which will be provided as a
> service in your linux hosting cpanel), set a cronjob which calls the "
> http://www.yoursite.com/check.php" URL every minute.... now a trigger will
> be there every minute to the script and the emails will be send irrespective
> of whether anyone is browsing the site or not.... hope it is clear...
> 

use cron - yes
have cron call a web URL - no, instead just call the script via the php CLI sapi,
e.g. a cmdline as follows in cron:

/usr/env php /path/to/your/check.php &> /dev/null
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.