. */ session_start(); // hide all error error_reporting(0); if (!isset($_SESSION["mikhmon"])) { header("Location:../admin.php?id=login"); } else { $session = $_GET['session']; $ping = $_GET['ping']; if(isset($ping) && !empty($session)){ include_once('../include/config.php'); $iphost = explode('!', $data[$session][1])[1]; $host=explode(":",$iphost)[0]; $port=explode(":",$iphost)[1]; if(empty($port)){ $port = 8728; }else{ $port = $port; } function ping($host,$port){ $fsock = fsockopen($host,$port,$errno,$errstr,5); if (! $fsock ){ return ( '

Ping Test ['.$host.':'.$port.']

'. "Host : ".$host." Port : ".$port."
". "Error Code : ".$errno."
". "Error Message : ".$errstr. "
Ping Timeout
". ' Close'. '
'); }else{ return ( '

Ping Test ['.$host.':'.$port.']

'. "Host : ".$host." Port : ".$port."
". "Ping OK
". ' Close'. '
'); } fclose($fsock); } $ping_test = ping($host,$port); print_r($ping_test); } }