cookies for a https website

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
chdnrajasekhar
Forum Newbie
Posts: 1
Joined: Tue May 06, 2008 1:05 am

cookies for a https website

Post by chdnrajasekhar »

Hi everyone,

I'm trying to get the cookies of a https url .can any one help me out . I had a code with me , previously i had used it for getting the cookies for a http url . when i use the same code im not getting the cookies . im giving the code below.

$ch = curl_init();
curl_setopt ($ch, CURLOPT_URL, $url);
curl_setopt ($ch, CURLOPT_COOKIESESSION, true);
curl_setopt ($ch, CURLOPT_COOKIEJAR, "C:/CookieJar.txt");
curl_setopt ($ch, CURLOPT_FOLLOWLOCATION, true);
curl_setopt ($ch, CURLOPT_RETURNTRANSFER, true);
$output = curl_exec ($ch);
curl_close ($ch);



THANQ

Rajasekhar.
User avatar
John Cartwright
Site Admin
Posts: 11470
Joined: Tue Dec 23, 2003 2:10 am
Location: Toronto
Contact:

Re: cookies for a https website

Post by John Cartwright »

Why is this in PHPDN forum?


Try adding

Code: Select all

curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);

Moved to PHP-Code.
Post Reply