cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: A sample to login and maintain session

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Mon, 15 Jun 2009 20:38:24 +0200 (CEST)

On Mon, 15 Jun 2009, Aditya Kumar Gupta wrote:

> I have enabled the cookie engine by calling curl_easy_setopt(curl,
> CURLOPT_COOKIEFILE, ""). When I try to connect to the second url, and POST
> data to it, it redirects me to a new page stating that the access is
> unautorized.

CURLOPT_COOKIEFILE is enough to activate cookies and if you then re-use the
same handle, libcurl will send off matching cookies in subsequent requests.

But to tell exactly what pieces your requests are missing, you need to
investigate what you need to send and what do you send etc, it isn't that
simple for us to guess.

-- 
  / daniel.haxx.se
Received on 2009-06-15