<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META NAME="Generator" CONTENT="MS Exchange Server version 6.5.7652.24">
<TITLE>RE: Problem accessing http sites using libcurl on maemo platform</TITLE>
</HEAD>
<BODY>
<!-- Converted from text/plain format -->

<P><FONT SIZE=2>Hi,<BR>
&nbsp;&nbsp; I am using following code and it is working for me.<BR>
******************************************************************************<BR>
&nbsp;char userid_passwd[256];<BR>
&nbsp;memset(userid_passwd, 0, sizeof(userid_passwd));<BR>
&nbsp;sprintf(userid_passwd,&quot;%s:%s&quot;, &quot;userid&quot;, &quot;passwd&quot;);<BR>
<BR>
curl_easy_setopt(curl, CURLOPT_PROXY, &quot;proxy_ip_address:port_no&quot;);<BR>
curl_easy_setopt(curl, CURLOPT_PROXYUSERPWD, userid_passwd);<BR>
*******************************************************************************<BR>
<BR>
Best Regards,<BR>
ABhijit<BR>
<BR>
<BR>
<BR>
<BR>
-----Original Message-----<BR>
From: maemo-users-bounces@maemo.org on behalf of TietoEnator LinuxTeam<BR>
Sent: Fri 5/23/2008 11:04 AM<BR>
To: maemo-users@maemo.org<BR>
Subject: Fwd: Problem accessing http sites using libcurl on maemo platform<BR>
<BR>
Hi all,<BR>
<BR>
i am unable to connect and get the html page of my blog account in<BR>
blogger.com website<BR>
Authentication problem with user name and password.<BR>
I hope some body can help me on this issue<BR>
here i am giving you the code snippet i used.<BR>
<BR>
<BR>
<BR>
curl_easy_setopt(curl_handle, CURLOPT_SSL_VERIFYPEER, FALSE);<BR>
<BR>
<BR>
&nbsp;curl_easy_setopt(curl_handle, CURLOPT_PROXY, &quot;&lt;my proxy settings&gt;&quot;);<BR>
<BR>
<BR>
&nbsp; curl_easy_setopt(curl_handle, CURLOPT_TIMEOUT, 20);<BR>
<BR>
<BR>
<BR>
&nbsp; curl_easy_setopt(curl_handle, CURLOPT_HTTPAUTH,&nbsp; CURLAUTH_ANY);<BR>
<BR>
&nbsp; curl_easy_setopt(curl_handle, CURLOPT_URL, &quot;<A HREF="http://blogger.com">http://blogger.com</A>&quot;);<BR>
<BR>
&nbsp;curl_easy_setopt (curl_handle, CURLOPT_FOLLOWLOCATION, 1);<BR>
&nbsp;curl_easy_setopt (curl_handle, CURLOPT_UNRESTRICTED_AUTH, 1);<BR>
&nbsp;curl_easy_setopt(curl_handle, CURLOPT_MAXREDIRS, 10);<BR>
&nbsp;curl_easy_setopt (curl_handle, CURLOPT_MAXCONNECTS, 20);<BR>
&nbsp;curl_easy_setopt (curl_handle, CURLOPT_AUTOREFERER, 1);<BR>
&nbsp;curl_easy_setopt (curl_handle, CURLOPT_COOKIEFILE, cookie);<BR>
&nbsp;curl_easy_setopt(curl_handle, CURLOPT_HTTP_VERSION,CURL_HTTP_VERSION_NONE);<BR>
&nbsp;curl_easy_setopt(curl_handle, CURLOPT_HTTPGET,1);<BR>
&nbsp;curl_easy_setopt(curl_handle, CURLOPT_HTTPHEADER,NULL);<BR>
&nbsp;curl_easy_setopt(curl_handle, CURLOPT_USERPWD, &quot;username:password&quot;);<BR>
<BR>
&nbsp; curl_easy_setopt(curl_handle, CURLOPT_FILE, my_file);<BR>
<BR>
authentication is failing all the time.<BR>
<BR>
</FONT>
</P>

</BODY>
</HTML>