Let's discuss how php achieves this effect. Check whether ping can be performed on 201.168.56.17. If you can ping .. Echo (latency) if ping fails, echo (& quot; pingreturn; & quot;) is returned to check whether the other host is running... Daniel gave me some advice. Let's start learning. Let's discuss how php achieves this effect.
Check whether ping can be performed on 201.168.56.17. If you can ping .. Echo (latency)
If ping fails, echo ("ping return;") is returned ;")
Is to check whether the host of the other party is running...
Daniel gave me some advice. Let's start learning. Let's discuss it together.
------ Solution --------------------
Find a piece of code:
PHP code
';} Echo 'pinging'. $ host.' ['. gethostbyname ($ host).'] with Port: '. $ port.' of data:
'. "\ R \ n"; for ($ I = 0; $ I <$ num; $ I ++) {echo ping ($ host, $ port ); sleep (1); ob_flush (); flush () ;}?>
------ Solution --------------------
Use exec () in php to call the command to achieve the best.
------ Solution --------------------
$ Ip = "192.168.1.1 ";
Exec ("ping $ ip", $ arr );
Print_r ($ arr );