Ver Mensaje Individual
  #1 (permalink)  
Antiguo 11/11/2003, 18:03
Leg0las
 
Fecha de Ingreso: octubre-2003
Ubicación: Galicia-España
Mensajes: 17
Antigüedad: 20 años, 5 meses
Puntos: 0
Webs online-offline

Alguien sabría decirme el porque me sale siempre que las webs están offline cuando no es cierto?
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$errstr20);
             if (!
$churl){
                
header("Location: $dead");
                }
             else {
                   
header("Location: $live");
          }
function 
server($addr){
         if(
strstr($addr,"/")){$addr substr($addr0strpos($addr"/"));}
         return 
$addr;
}
?>
Otro más:
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 los enlaces online o offline tengo los siguientes archivos:
· Para visualizar el primer script:
Código:
<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>
·Para visualizar el segundo script:
Código:
<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>
Estes scripts no son mios, los he visto por las red.

Gracias y un saludo

Última edición por Leg0las; 11/11/2003 a las 18:05