PakShells Communications

Checking started, please be patient.

\n"; $i++; } if ( ! $ips=file("$ipfile")) { echo "error opening $ipfile"; die(); } $ip=trim($ip); $time_start=time(); foreach ($ips as $ip) { $count++; if ($tid == 1) { $tid="2"; }else{ $tid="1"; } //sleep(1); //slow things down a bit to get accurate results $do=exec("ping -c1 -q $ip 2>&1",$output,$err); if (preg_match("/(.*)100%(.*)/",$output[3],$o)) { $status="down"; $fcolor="red"; $down++; $pingdown="TRUE"; }elseif ($output[3] == "") { $status="down"; $fcolor="red"; $down++; $pingdown="TRUE"; }else{ $status="up"; $fcolor="green"; } $do=exec("host $ip",$output1); $pieces=explode(" ",$output1[0]); $ptr=$pieces[4]; $ptr=rtrim($ptr, "."); $ip=trim($ip); if ($ptr == "3(NXDOMAIN)") { $ptr="Cant find PTR record for this ip."; }else{ $do=exec("host $ptr",$output2); $pieces1=explode(" ",$output2[0]); $arecord=$pieces1[3]; $arecord=trim($arecord); if ($pingdown == "TRUE") { $ptr="Does not respond to ping"; $status="down"; $fcolor="red"; } if ($arecord != $ip && $pingdown != "TRUE") { $ptr="$ip resolves to $ptr, but $ptr does not resolve back"; $status="down"; $fcolor="red"; $down++; }elseif ($pingdown != "TRUE" && $arecord = $ip) { $status="up"; $fcolor="green"; $up++; } } ?>

Check completed in: seconds
Number of working vhosts:
Number of non-working vhosts:
Total vhosts:

Copyright: PakShells
Contact bullet@cyber.net.pk if you need custom php/bash scripts.