Reliably start a background process with browser

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
stevehaysom
Forum Newbie
Posts: 4
Joined: Thu Aug 21, 2003 10:59 am

Reliably start a background process with browser

Post by stevehaysom »

Hi

I am writing a mailing list manger using PHP and MySQL, using PHP 4.3 and FreeBSD Linux.

I need to start a background process that can carry on after a browser process has finished, so that a mailing can be sent out.

Can anyone tell me the best way to do this, or point me to an article/tutorial. I've tried using set time limit, but it only sent out 2 emails before stopping. Fork looks a bit complicated.

Thanks for any help

Steve
pootergeist
Forum Contributor
Posts: 273
Joined: Thu Feb 27, 2003 7:22 am
Location: UK

Post by pootergeist »

if you can exec then a wget script call with a nulled output should (?) work

exec('wget http://www.where-ever.com/script.php > /dev/null');

then the server is calling the page rather than the browser.
stevehaysom
Forum Newbie
Posts: 4
Joined: Thu Aug 21, 2003 10:59 am

Post by stevehaysom »

Thanks. I'll try it.

Steve
Post Reply