Ver Mensaje Individual
  #2 (permalink)  
Antiguo 11/12/2009, 18:39
Avatar de claudiovega
claudiovega
 
Fecha de Ingreso: octubre-2003
Ubicación: Puerto Montt
Mensajes: 3.667
Antigüedad: 21 años, 3 meses
Puntos: 11
Respuesta: Paginas web por correo....

Mira este ejemplo del manual:

http://cl.php.net/manual/en/function...t-contents.php

En especial esta parte:

Código PHP:
<?php
// Create a stream
$opts = array(
  
'http'=>array(
    
'method'=>"GET",
    
'header'=>"Accept-language: en\r\n" .
              
"Cookie: foo=bar\r\n"
  
)
);

$context stream_context_create($opts);

// Open the file using the HTTP headers set above
$file file_get_contents('http://www.example.com/'false$context);
?>
Como ves, file_get_contents() es capaz de leer una url y entregarte el resultado en una variable.

$cadenahtml = file_get_contents('http://www.example.com/');