Create 20 threads each launching a php script
Posted on 2004-04-21
I have a system (Linux RH7.3) written in php but part of the system is to go and parse html pages. The demand is now too high for the script and therefor I need to launch multiple versions of the php script. I cannot just increase the number of cron jobs as each cycle has to be passed a refernce number of the client whom it is to action.
What I need to do (No experience of perl or python) is create a cgi app I can call from a cron job which once called creates a number of threads (var x, passed by call as parameter) and each thread will call a version of the php script. Once all php scripts have returned their responses the cgi closes?
Does this make sense?, I hope so lol.
How is it best to do this and can it indeed be done?
So, to summarise
How can I create a perl or likewise script that will be passed 2 vars (customer_id, thread_qty) and then each thread will go and call a php script. Once the php script completes the thread is closed, once all threads are closed the cgi stops.
Thanks for any help