Ver Mensaje Individual
  #5 (permalink)  
Antiguo 18/11/2003, 00:32
Avatar de nuevo
nuevo
 
Fecha de Ingreso: mayo-2003
Ubicación: Spain
Mensajes: 2.009
Antigüedad: 21 años
Puntos: 2
podrias usar una funcion,, o 2

Código PHP:
/********************************************************************************/
/*              FUNCION PARA SABER SI LAS DESCARGAS ESTAN ACTIVAS               */
/********************************************************************************/
function FUNC_urlHeader($url) {
  
$a_url parse_url($url);
  if (!
$a_url[port]) $a_url[port] = 80;
  
$fid fsockopen($a_url[host], $a_url[port], $errno$errstr$timeout);
  if (!
$fid) return "Host not responding";
  
fputs($fid"HEAD $a_url[path] HTTP/1.0\r\nHost: $a_url[host]\r\n\r\n");
  
$head fread($fid4096);
  
fclose($fid);
  return 
$head;
}

function 
FUNC_urlExiste($url) {
  return 
preg_match('#^HTTP/.*\s+200\sOK\s#i'FUNC_urlHeader($url));
}
////////////////////////////////////////////////////////////////////////////////// 
__________________
3w.valenciadjs.com
3w.laislatv.com