curl-and-php
how to pass cookies to a third party site
Date: Mon, 14 May 2007 10:23:28 +0500
Hi
I am writing a script where I want to send cookies received from a page call
and stored on my server to a third party site so that when I make the page
call of the third party site I will also send it the cookie value that it
need to use for the session,
here is my code so far
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL,$LOGINURL);
curl_setopt($ch, CURLOPT_USERAGENT, $agent);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS,$POSTFIELDS);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt($ch, CURLOPT_REFERER, ' http://thirdpartysite.com');
curl_setopt($ch, CURLOPT_COOKIE, $theDate); //i read the cookie from the
cookie.txt stored on my server from the previous call
I am stuck with it please guide me.
many thanks in advance.
_______________________________________________
http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-and-php
Received on 2007-05-14