Ver Mensaje Individual
  #2 (permalink)  
Antiguo 05/11/2011, 16:24
Avatar de NUCKLEAR
NUCKLEAR
Moderador radioactivo
 
Fecha de Ingreso: octubre-2005
Ubicación: Cordoba-Argentina
Mensajes: 5.688
Antigüedad: 18 años, 6 meses
Puntos: 890
Respuesta: Codigo fuente con curl

Te falta una directiva a curl_setopt() :

CURLOPT_RETURNTRANSFER TRUE to return the transfer as a string of the return value of curl_exec() instead of outputting it out directly.


<?php
$curl = curl_init();
curl_setopt($curl, CURLOPT_URL,
'http://www.google.es');
curl_setopt($curl, CURLOPT_USERAGENT, "Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)");
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
$data = curl_exec($curl);
echo htmlentities($data, ENT_QUOTES);
curl_close($curl);

?>
__________________
Drupal Argentina