By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
437,830 Members | 2,276 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 437,830 IT Pros & Developers. It's quick & easy.

Problem with PHP CURL - logging to secure site

P: 14
Hi,

I am trying to access a site on secure server (http) through CURL. I have username and password with me.

The site is using sessions or cookies to maintain user state through all screens of website. I am not aware, what are the session or cookie names ?

So, how do I maintain the user state and access web pages of the site using CURL once I log in with CURL ?

Thanks,
Sandeep
Aug 30 '08 #1
Share this Question
Share on Google+
2 Replies


Atli
Expert 5K+
P: 5,058
Hi.

To maintain a session using Curl, you would have to store the cookie data in a file that PHP can access.

To do that, simply create a file that PHP has write access to and use the curl_setopt function to set the CURLOPT_COOKIEFILE option, specifying the path to your file.
Aug 30 '08 #2

P: 14
Thanks Atli, I'll try that.
Aug 31 '08 #3

Post your reply

Sign in to post your reply or Sign up for a free account.