Ver Mensaje Individual
  #2 (permalink)  
Antiguo 16/06/2010, 09:46
mesenier
 
Fecha de Ingreso: diciembre-2008
Mensajes: 91
Antigüedad: 15 años, 5 meses
Puntos: 1
Solucion

$url_a_comprobar ='http://euskaratu.com';



$context = array('http' => array('method' => 'HEAD'));
stream_context_get_default($context);
$hdrs = get_headers($url_a_comprobar);
$available = false;
foreach ($hdrs as $line) {
if (strpos($line, '200 OK')) {
$available = true;
break;
}
}
if ($available == true){
echo 'existe';
}else{
echo 'no existe';
}