Dear Sir,
Can you please let me know that is PHP supporting muti-threading (Parallel execution of two tasks written in one script) or not.
I want to get data from different db server and to visit one server suppose takes one minutes then if my PHP script visit 10 servers, it will takes 10 minutes. but i want to save my time and want to send 10 parallel queries to the 10 servers and then to collect there response in just one minute. I hope now you may have some better idea what i am taking about.
<?php
conenct_to_first_db_server();
conenct_to_second_db_server();
conenct_to_third_db_server();
// and so on.... upto 10 servers
?>
As the above code will execute line by line so first function will first run and takes the time and then second and so on. But it there a way to fire all these 3 or more functions simultaneously or parallel? I do not let my PHP engine to wait for the first function to first complete and then transfer the control to the second.
Best Regards,
Imran Khalid
imranlink@hotmail.com