curl-library
Re: Beginner's question
Date: Tue, 10 Aug 2004 21:34:26 +0200
On Wed, Aug 11, 2004 at 02:40:16AM +0900, nkb wrote:
> After spending 2 days reading and searching infomation, I'm still pretty
> much lost in how to use cURL for https access. What I would like to do
> is simply to access a web page via https s.a.
> https://some.page.com/test.aspx. The page would require my username and
> password too. What functions availble from cURL that allows me to do
> that in the most minimal codes? Appreciate a little more pointers to
> help me kick start using this cURL library. Zillion thanks!
Using curl is the same, whether you talk to a normal webserver
or an http webserver. See the samples distributed with the curl
library, e.g. the "examples/simple.c" file.
Dont be confused by the simplessl.c file - that example is much more
complicated, but that is because it uses SSL certificates for
authentication.
For the password stuff, you can set the CURLOPT_NETRC option with
curl_easy_setopt(curlhandle, CURLOPT_NETRC, 1);
then it will read the username and password info from your ~/.netrc
file.
-- Henrik StornerReceived on 2004-08-10