Me refiero a que por ejemplo estoy escribiendo en este foro y el script me dice que está offline forosdelweb.com.
Lo único que hice es subirlo a un espacio web.
he probado varios y nada:
Código PHP:
<?
$live = "live.gif";
$dead = "dead.gif";
list($addr,$port)= explode (':',"$link");
if (empty($port)){
$port = 80;
}
$churl = @fsockopen(server($addr), $port, $errno, $errstr, 20);
if (!$churl){
header("Location: $dead");
}
else {
header("Location: $live");
}
function server($addr){
if(strstr($addr,"/")){$addr = substr($addr, 0, strpos($addr, "/"));}
return $addr;
}
?>
Código PHP:
$vivo = "verde.gif";
$muerto = "rojo.gif";
$enlinea = fopen("$enlace", "r");
if (!$enlinea){
header("Location: $muerto");
}
else {
header("Location: $vivo");
}
fclose($enlinea);
?>
· Para visualizar el primer script:
Código:
·Para visualizar el segundo script:<html> <head> <title>Web Server Status</title> </head> <body bgcolor="#FFFFFF"> <table border="0" cellspacing="0" cellpadding="3"> <tr> <td width="77%"><font face="Arial, Helvetica, sans-serif" size="2">Microsoft.com</font></td> <td width="23%"><img src="status.php?link=www.microsoft.com" width="37" height="20"></td> </tr> <tr> <td width="77%"><font face="Arial, Helvetica, sans-serif" size="2">Apple.com</font></td> <td width="23%"><img src="status.php?link=www.apple.com" width="37" height="20"></td> </tr> </table> </body> </html>
Código:
Estes scripts no son mios, los he visto por las red.<HTML> <HEAD> <TITLE>Prueba</TITLE> </HEAD> <BODY BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000FF" VLINK="#800080"> <img src="estado.php?enlace=http://www.forosdelweb.com"> </BODY> </HTML>
Gracias y un saludo