Reputation: 5500
What I'd like to do is use PEAR's Net_Ping package to ping a few servers to check if they are online and then display the status on a webpage.
The problem I realized is that if I use 3 packets to conduct the ping test, that equates to about 3 seconds. If I have to check 10 servers, that would leave the user waiting 30seconds on the page...
Would it be possible to have my 'ping' function run 10 instances simultaneously for example, so that the user is only waiting 3 seconds instead of 30?
I've setup my 'ping program' as a Model/Controller/View paradigm and my ping function is a method in the main controller class. I'd like to keep my paradigm the same if possible.
Upvotes: 1
Views: 2009
Reputation: 23722
You can split your ping into a script by itself and then call them asynchronously using the following method:
Upvotes: 1