Hi, Is it possible to run PHP script to do parallel processing? HOw do I do it?
Thans
PHP is not really set up for parallel processing.
You may be able to use system() or exec(), and the shared memory functions to do the task.
It all depends on why you need parallel processing.
HalfaBee
Well the script I'm doing is something like a bot. It will go out and look for html pages and do some processing to capture the data on it. I was hoping that I can code the script in they way that it can continue to "digest" the html pages while it starts to load the next one...
You could have 2 scripts running one to follow links and one to get the pages. You would need to use a database,file or shared memory to pass the information to each program.
Here's how I see it
get.php looks at fifo stack and gets first page. places this page in a file to be procesed by proc.php. this scans page for links and places them in the fifo stack.