![Antiguo](http://static.forosdelweb.com/fdwtheme/images/statusicon/post_old.gif)
20/03/2015, 13:49
|
| | Fecha de Ingreso: diciembre-2012 Ubicación: Murcia
Mensajes: 329
Antigüedad: 12 años, 1 mes Puntos: 4 | |
Respuesta: No consigo que en la web me aparezca el estado del servidor. Prueba haber que tal
Código PHP:
Ver originalfunction check($ip, $port) { $file = fsockopen($ip, $port, $errno, $errstr, 2); $status = 0; if(!$file) $status = -1; // Site is down else { $status = ($stoptime - $starttime) * 1000; $status = floor($status); } return $status; } if(check("IP", "PUERTO") != -1) { echo "online"; } else { echo "offline"; }
|