Hi actually I am making a temporized newsletter system (so I have the DB set up to save all the data needed like the message emails and so on)
I have a cronjob (cron.php) which is called every minute, this cronjob (actually) accesses the DB get out the active sessions , creates the email and sends the email with phpmailer (5 every minute to be sure the server won’t get blacklisted) working fine…
..until I decide to use more SMTPs (having 30) to have 150 emails sent / minute (each smtp gets 5 mails)
since there are 150 calls for sending mails + DB accessing + script run-time I might get out of allowed php execution time so I decide to brake down the mail sending part into another file (mail.php which will be called by cron.php) so from the actual: 1 process sending 150 emails – I want to get to 30 processes make 5 emails each
I was thinking to call mail.php with cURL… but each cURL waits for its response (I search for silent cURL but haven’t found anything useful)
Solutions would be:
a) having 30 cronjobs + 30 php files… I don’t like it since I don’t wanna add cronjobs each time another smtp has to be added
b) php Sockets – send 30 socket message without w8ing for the response.. (I don’t know if it would make a different process)..
ANY IDEA ?!?
well yeah… but what if the server rules limit the execution time to the default 30S… I would like a solution for the more distinct processes (it might be useful at other projects)
...in other words how can a php script execute (without the EXEC function cuz that’s vulnerable and usually disabled on the hosting servers) another php script without requesting any feedback from it…
...like when the bully kicks the little boy on the tricycle down from the hill … he know that the little boy will brake his everything… but he goes away cuz he don’t care when and how…