Ver Mensaje Individual
  #80 (permalink)  
Antiguo 22/06/2011, 20:29
Avatar de abimaelrc
abimaelrc
Colaborador
 
Fecha de Ingreso: mayo-2009
Ubicación: En el planeta de Puerto Rico
Mensajes: 14.734
Antigüedad: 14 años, 11 meses
Puntos: 1517
Respuesta: [APORTE] file_get_contents(), cURL, HTTP_Request

Trata de esta forma entonces
Código PHP:
Ver original
  1. <?php
  2. $options = array('http' =>
  3.     array(
  4.         'header' => 'User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; es-ES; rv:1.9.0.6) Gecko/2009011913 Firefox/3.0.6' . PHP_EOL
  5.             . 'Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5' . PHP_EOL
  6.             . 'Cache-Control: max-age=0' . PHP_EOL
  7.             . 'Connection: keep-alive' . PHP_EOL
  8.             . 'Keep-Alive: 300' . PHP_EOL
  9.             . 'Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7' . PHP_EOL
  10.             . 'Accept-Language: en-us,en;q=0.5' . PHP_EOL
  11.             . 'Pragma: ' . PHP_EOL
  12.     )
  13. );
  14. $context = stream_context_create($options);
  15. $page = file_get_contents('http://consultas.curp.gob.mx/CurpSP/curp1.do?strPrimerApellido=TORRES&strSegundoAplido=ZAVALA&strNombre=ERIK%20FRANCISCO&strdia=22&strmes=01&stranio=1983&sEntidadA=DF&sSexoA=H&strTipo=A', false, $context);
  16. echo $page;
__________________
Verifica antes de preguntar.
Los verdaderos amigos se hieren con la verdad, para no perderlos con la mentira. - Eugenio Maria de Hostos