curl-and-php
Curl only capture and save a part of Cookie. What should I do?
Date: Fri, 8 May 2009 16:40:59 +0700
Hello, i am working with CURL. I did many small scripts with CURL
succesfully but the one i am working, i cannot make CURL to get right
cookie.
This is the normal cookie of that site when I use browser such as FF or IE
====
Cookie: JSESSIONID=A11C5C53CF0167B359B685241523834D;
CASTGC=TGT-497566-Yx7RLbNcouF5yNeNpQGcCEdbZN0IFOHraz01WYj4FBhErWRsfU-cas;
org.springframework.web.servlet.i18n.CookieLocaleResolver.LOCALE=vi;
__utma=130111240.362387723.1241281795.1241453636.1241629556.5;
__utmz=130111240.1241281795.1.1.utmccn=(direct)|utmcsr=(direct)|utmcmd=(none)
====
I used the following code to get cookie as other sites I have done,
but it only captures a part of cookie like this
"JSESSIONID=A11C5C53CF0167B359B685241523834D".
I have search a lot on google.com all of this week before posting. But
i cann't find the answer for my problem. Please help me.
============
$url="https://www.somesitehere.com/";
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL,$url);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, FALSE);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 0);
curl_setopt($ch, CURLOPT_TIMEOUT, 60);
curl_setopt($ch, CURLOPT_COOKIEJAR, 'Z:/www/beta/log/cookie.txt');
curl_setopt($ch, CURLOPT_COOKIEFILE, 'Z:/www/beta/log/cookie.txt');
curl_setopt($ch, CURLOPT_FAILONERROR, 1);
curl_exec($ch)
curl_close ($ch);
============
Thank you everyone.
Nice weekend
_______________________________________________
http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-and-php
Received on 2009-05-08