Ver Mensaje Individual
  #6 (permalink)  
Antiguo 05/03/2005, 03:56
ponjos
 
Fecha de Ingreso: noviembre-2002
Mensajes: 24
Antigüedad: 21 años, 5 meses
Puntos: 0
Una opción, si puedes usar cURL, sería:
Código PHP:
$telefono='999999999';
ob_start();
$ch=curl_init("http://www.telefonicaonline.com/no/servlet/no32tejg");
curl_setopt($chCURLOPT_HEADER1);
curl_setopt($chCURLOPT_POST1);
curl_setopt($chCURLOPT_POSTFIELDS"NUMTELEF=$telefono");
curl_exec ($ch);
curl_close ($ch);
$head ob_get_contents();
ob_end_clean();
$regex '/Content-Length:\s([0-9].+?)\s/';
if (
preg_match($regex$head$matches))
   {
   
$disponible=(($matches[1] > 500) ? 'NO' 'SI');
   }

   echo 
$disponible
Saludos.