Fann þennan kóða. Þetta er frekar slow og dirty leið en here goes. function isalive($host) { if (eregi(“Windows”, getenv(“OS”))) { /* Windows ping: first line from output is empty if sucessful */ exec(“ping -n 1 ”.$host, $a); return (($a[0] == “”)?1:0); } else { /* POSIX ping: always returns 0 if sucesful */ exec(“ping -c 1 ”.$host, $a, $sysret); return ((sysret == 0)?1:0); } } /* test the function */ echo “”; echo “foo.bar.net : ”.isalive(“foo.bar.net”); echo “osnippets.org :...