Ver Mensaje Individual
  #2 (permalink)  
Antiguo 30/07/2002, 10:07
Cluster
O_O
 
Fecha de Ingreso: enero-2002
Ubicación: Santiago - Chile
Mensajes: 34.417
Antigüedad: 22 años, 3 meses
Puntos: 129
Re: Re-Nuevamente el reto :D

Y daleee ...

Se mas explicativo en los temas de tus preguntas ...

El echo que yo esté rondando por aqui en los foros no implica que sepa solucionar tu problema .. Cualquiera puede hacerlo ...

Ahh y se me escribe Cluster jeje no Clustes .. jaja

------------------

Y sobre tu pregunta ( o mas bien que te hagan el codigo ¬¬?¿ :P):

Prueba a usar este metodo .. es basicamente lo que comenta Nok sobre lo de Herminio ..

Código:
<?php 

/* This scripthas been written by codexx fro speedpool.com. Feel free to use this script,  
feel free to alter it as well. I am by far not a php expert but I try my best.  
If you alter this script or enhance it, I would be very grateful if you could email that improvement.  
Thank you. mailto:[email protected] */ 
function url_live($host, $path )  
{  
$fp = fsockopen ("$host", 80, &$errnr, &$errstr) or die("$errno: $errstr");  
fputs($fp,"GET $path HTTP/1.0\n\n");  
while (!$end)  
{  
$line = fgets($fp, 1024);  
if (stristr($line, '200 OK')) { 
$end = true; 
return true; 
} 
if (stristr($line, '404 NOT')) { 
$end = true; 
return false; 
}  
}  
fclose($fp);  
}  



$url = "http://dir.yahoo.com/Computers_and_Internet/Software/"; 

$parsed = parse_url($url); 




echo $url,"<p>"; 


    if ((checkdnsrr($parsed["host"],"A")) != 1) { 
    echo "<br> We have no DNS record, exiting now"; 
    }else { 
             echo "<br>We have a DNS record time to check for an existant page<br><br>"; 
              
              
             if (!url_live($parsed["host"], $parsed["path"])) { 
             echo "The url you have entered does not seem to be active anymore a 404 \" 
             Page Not Found\" error was returned. I am exiting now"; 
exit; } else { echo "The Url you have supplied: $url, has a DNS record and returns no errors"; } 

             
}
Eso si, si no te va lee esto con atencion:
<a href='ir.asp?http://www.php.net/manual/es/features.remote-files.php' target='_blank'>http://www.php.net/manual/es/features.re...</a>