Ver Mensaje Individual
  #6 (permalink)  
Antiguo 21/09/2011, 19:54
Avatar de emilianito1995
emilianito1995
 
Fecha de Ingreso: enero-2010
Mensajes: 9
Antigüedad: 14 años, 3 meses
Puntos: 0
Respuesta: Enviar cookie mediante file_get_contents

Cita:
Iniciado por gustavopino Ver Mensaje
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]
Pero como pongo el contenido de mi cookie ahi ?