Ver Mensaje Individual
  #5 (permalink)  
Antiguo 21/09/2011, 13:28
Avatar de gustavopino
gustavopino
 
Fecha de Ingreso: septiembre-2011
Ubicación: venezuela
Mensajes: 152
Antigüedad: 12 años, 7 meses
Puntos: 29
Respuesta: Enviar cookie mediante file_get_contents

creo si no estoy equivocado es asi:

Código PHP:
Ver original
  1. <?php
  2. // Create a stream
  3. $opts = array(
  4.   'http'=>array(
  5.     'method'=>"GET",
  6.     'header'=>"Accept-language: en\r\n" .
  7.               "Cookie: foo=bar\r\n"
  8.   )
  9. );
  10.  
  11. $context = stream_context_create($opts);
  12.  
  13. $file = file_get_contents('http://www.example.com/', false, $context);
  14. ?>
Creo que es lo que buscabas cualquier cosa consulta el manual de php en
[URL="http://php.net/manual/es/function.file-get-contents.php"]http://php.net/manual/es/function.file-get-contents.php[/URL]
__________________
Visita a Publiventa donde compras y vendes de todo