Re: Can php do this?

From: Date: Sun, 25 Nov 2001 07:52:20 +0000
Subject: Re: Can php do this?
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-75636@lists.php.net to get a copy of this message
On 24 November 2001 23:45, Michael Sims spaketh unto ye recipient: > It sure can. There's a couple of ways to accomplish this. I personally > think the easiest way is to code your page like normal, then call it in a > cron job via lynx. Let's say you have a page called "page.php" that > connects to your database, retrieves the email addresses, and sends the > emails. To call it from a cron job add the following to your crontab: > > 0 8 * * * /usr/bin/lynx -dump http://localhost/page.php > > /path/to/logfile/or/dev/null Nice tip! Another alternative is using wget on the URL, or links -dump if you have that instead. Or if your script has #!/usr/bin/php or whatever path at the top and is made executable, you can just call that script without relying on the webserver. I think, even if it's just a normal php file you could cron it as /usr/bin/php <scriptpath/name>. -- Casey Allen Shobe cshobe@softhome.net GCS/CM d+ s+:->+: a-- C++(++++) ULU++++$ P- L+++>++++ E- W++ N++ !o K- w-- !O M V- PS++ PE Y+ PGP>++ t+ 5+ X R>+ tv-- b++ DI+ D---- G++ e h-(*) r--- z--

« previous php.general (#75636) next »