cURL / Mailing Lists / curl-library / Single Mail

curl-library

How to sent username and password using post method

From: Ajeet kumar.S <ajeetkumar.s_at_jasmin-infotech.com>
Date: Mon, 14 Jul 2008 15:02:24 +0530

Hi all,

Thank you Joe N.I was trying to implement login using post method using curl
api but I did not get success. Which is written below?

 

Char user_passwd[128];

Strcpy(user_passwd,"username=abc123_at_yahoo.com&password=abc");

struct curl_slist *xmit_login_header_list = NULL;

xmit_login_header_list =
curl_slist_append(xmit_login_header_list,"Content-Type:
application/x-www-form-urlencoded");

curl_easy_setopt(curl , CURLOPT_POST, 1);

curl_easy_setopt(curl, CURLOPT_URL, "http://www.yahoo.com");

curl_easy_setopt(curl, CURLOPT_POSTFIELDS,);

curl_easy_perform(curl );

 

please suggest me how I can implement the login process using POST method
using curl api.

 

Thank you.

Regards,

Ajeet.
Received on 2008-07-14