Hundreds of IP, is to be able to find a timely IP is not through.
The message is then returned.
Side dishes, just on the internet to read a few code, useful ping, useful socket,curl, to write
But do you think the efficiency is not quite appropriate?
Ask an experienced friend to support a weapon.
Reply content:
Hundreds of IP, is to be able to find a timely IP is not through.
The message is then returned.
Side dishes, just on the internet to read a few code, useful ping, useful socket,curl, to write
But do you think the efficiency is not quite appropriate?
Ask an experienced friend to support a weapon.
Use PHP to call the Linux Fping tool through the system function, so you can ping it in batches. (Fping can make a large number of ping requests in parallel in a rotating fashion)
So simple code, you should write it?
Use the tools, don't build your own wheels.
You should try the asynchronous library, which will take the longest delay in the ping and not all of the ping time accumulation. PHP has Swoole, which is located in Https://github.com/swoole/swoole-src. You can also choose Nodejs to pass the final results to PHP via the API.