RE: Problem accessing http sites using libcurl on maemo platform

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Title: RE: Problem accessing http sites using libcurl on maemo platform

Hi,
   I am using following code and it is working for me.
******************************************************************************
 char userid_passwd[256];
 memset(userid_passwd, 0, sizeof(userid_passwd));
 sprintf(userid_passwd,"%s:%s", "userid", "passwd");

curl_easy_setopt(curl, CURLOPT_PROXY, "proxy_ip_address:port_no");
curl_easy_setopt(curl, CURLOPT_PROXYUSERPWD, userid_passwd);
*******************************************************************************

Best Regards,
ABhijit




-----Original Message-----
From: maemo-users-bounces@xxxxxxxxx on behalf of TietoEnator LinuxTeam
Sent: Fri 5/23/2008 11:04 AM
To: maemo-users@xxxxxxxxx
Subject: Fwd: Problem accessing http sites using libcurl on maemo platform

Hi all,

i am unable to connect and get the html page of my blog account in
blogger.com website
Authentication problem with user name and password.
I hope some body can help me on this issue
here i am giving you the code snippet i used.



curl_easy_setopt(curl_handle, CURLOPT_SSL_VERIFYPEER, FALSE);


 curl_easy_setopt(curl_handle, CURLOPT_PROXY, "<my proxy settings>");


  curl_easy_setopt(curl_handle, CURLOPT_TIMEOUT, 20);



  curl_easy_setopt(curl_handle, CURLOPT_HTTPAUTH,  CURLAUTH_ANY);

  curl_easy_setopt(curl_handle, CURLOPT_URL, "http://blogger.com");

 curl_easy_setopt (curl_handle, CURLOPT_FOLLOWLOCATION, 1);
 curl_easy_setopt (curl_handle, CURLOPT_UNRESTRICTED_AUTH, 1);
 curl_easy_setopt(curl_handle, CURLOPT_MAXREDIRS, 10);
 curl_easy_setopt (curl_handle, CURLOPT_MAXCONNECTS, 20);
 curl_easy_setopt (curl_handle, CURLOPT_AUTOREFERER, 1);
 curl_easy_setopt (curl_handle, CURLOPT_COOKIEFILE, cookie);
 curl_easy_setopt(curl_handle, CURLOPT_HTTP_VERSION,CURL_HTTP_VERSION_NONE);
 curl_easy_setopt(curl_handle, CURLOPT_HTTPGET,1);
 curl_easy_setopt(curl_handle, CURLOPT_HTTPHEADER,NULL);
 curl_easy_setopt(curl_handle, CURLOPT_USERPWD, "username:password");

  curl_easy_setopt(curl_handle, CURLOPT_FILE, my_file);

authentication is failing all the time.

_______________________________________________
maemo-users mailing list
maemo-users@xxxxxxxxx
https://lists.maemo.org/mailman/listinfo/maemo-users

[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Big List of Linux Books]    

  Powered by Linux