comprobarConnServidor('http://www.sdfjsdfjhsdfkjfsd.com');
da Conectado
Asi:
Código PHP:
Ver original<?php
// Function to check response time
function pingDomain($domain){
$file = @fsockopen ($domain, 80, $errno, $errstr, 10); $status = 0;
if (!$file) $status = -1; // Site is down
else {
$status = ($stoptime - $starttime) * 1000;
$status = floor($status); }
if ($status <> -1) {
echo 'Conectado';
} else {
echo 'No conectado';
}
}
pingDomain('http://www.sdhasdhasdhdsa.com');