123qwertyuiop456 Posted August 28, 2006 Share Posted August 28, 2006 [color=red][size=16pt]Hi![/size][/color]User writes a message, than it should be posted to 300-800 e-mails.Firstly I-ve made message.html and mailer.php. User writes message in message.html, then clics submit, and than the script runs:[code]/*mailing... mailing...*/header("Location: .........");[/code]But, unfortunately, in this case user has to wait for long time, before he'll be redirected.How to let user go for another location, leaving the mailing script? Link to comment https://forums.phpfreaks.com/topic/18895-running-the-script-for-a-long-time/ Share on other sites More sharing options...
.josh Posted August 28, 2006 Share Posted August 28, 2006 one random solution: when the user clicks submit, put the message and sender and whatever other info in a "queue" in your database and have a seperate script go to your "queue" and grab the info (and delete it after it gets it) every minute or whatever using a cron job, and have that seperate script do the mail sending. then you could redirect the user somewhere else instantly, or whatever. but there's probably a better solution. i've never done mass mailer type scripts, so i don't know all the "tricks" to it. Link to comment https://forums.phpfreaks.com/topic/18895-running-the-script-for-a-long-time/#findComment-81583 Share on other sites More sharing options...
123qwertyuiop456 Posted August 28, 2006 Author Share Posted August 28, 2006 Great idea, Crayon Violent! The mailing-list and message are constant, so I have to save only "start mailing" flag in DB. Thank you. Link to comment https://forums.phpfreaks.com/topic/18895-running-the-script-for-a-long-time/#findComment-81593 Share on other sites More sharing options...
.josh Posted August 28, 2006 Share Posted August 28, 2006 also while reading another thread i coincidentally came by this that might help you (and it looks better too):http://www.phpfreaks.com/tutorials/71/0.php Link to comment https://forums.phpfreaks.com/topic/18895-running-the-script-for-a-long-time/#findComment-81596 Share on other sites More sharing options...
123qwertyuiop456 Posted August 28, 2006 Author Share Posted August 28, 2006 My ICQ friend is just tring to explain me the same =) Thanx once more! Link to comment https://forums.phpfreaks.com/topic/18895-running-the-script-for-a-long-time/#findComment-81601 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.