| Autor | Zpráva | ||
|---|---|---|---|
| IdemeNaHavaj Profil |
#1 · Zasláno: 6. 10. 2014, 19:16:20
function ping($host, $port, $timeout) {
$tB = microtime(true);
$fP = fSockOpen($host, $port, $errno, $errstr, $timeout);
if (!$fP) { return "down"; }
$tA = microtime(true);
return round((($tA - $tB) * 1000), 0)." ms";
}
//Echoing it will display the ping if the host is up, if not it'll say "down".
echo ping("www.google.com", 80, 10);Tento skript som našiel na zistenie pingu nejakej stránky. Mám otázku: Tento skript zmeria ping medzi: a) mnou a google.com b) serverom (hostingom) a google.com ????? |
||
| Joker Profil |
#2 · Zasláno: 6. 10. 2014, 19:22:16
IdemeNaHavaj:
PHP se zpracovává na serveru, takže pochopitelně ping mezi serverem a Googlem. |
||
|
Časová prodleva: 12 let
|
|||
0