[Php-it] Curl session
cprocent at studenti.unina.it
cprocent at studenti.unina.it
Mon Apr 3 19:55:45 CEST 2006
> Ma se fai qualcosa del tipo:
> $datisessione=session_name()."=".session_id();
> header("Location:http://paginachevuoi.php?".$datisessione);
> funziona?
Questo è il codice che uso :
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, mysite)
curl_setopt($ch, CURLOPT_POST, 1 );
curl_setopt($ch, CURLOPT_POSTFIELDS, $post_data);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
//curl_setopt( $ch,CURLOPT_COOKIE, PHPSESSID.'='.session_id());
$postResult = curl_exec($ch);
echo $postResult;
die();
Decommentando la riga di codice, il server sembra quasi rimanga congelato e
l'operazione impiega molto tempo senza concludersi..
La soluzione con header non l'ho provata e non riesco a capire come dovrebbe
funzionare se non gestisco io in qualche modo nella pagina le variabili di
sessione che gli passo tramite get.
thank you
----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.
More information about the Php-it
mailing list