cURL / Mailing Lists / curl-library / Single Mail


Re: Help translate CURL to libcurl please

From: Dan Fandrich <>
Date: Thu, 8 May 2008 10:51:13 -0700

On Thu, May 08, 2008 at 07:25:44PM +0200, Koopa One wrote:
> Ok, i have 2 CURL-Lines i need to use in libcurl. As i am new to "curling" i
> hope someone can help me here:
> Ok, here is the code in my program, that i use to fetch a file (i call the
> curl.exe with that arguments out of my program):
> the first one fetches the cookie:
> curl -c cookie.txt -L
> the second one gets the files with sending the cookie stored before.
> curl --cookie cookie.txt -o xxxxx.rar --referer
> xxxxx.html
> No i have found a wrapper for libcurl and want to do the program exactly the
> same. Unfortunatelly i dont know which switches are which keyword. Can someone

Let curl help you; the --libcurl option will write a C program using libcurl
and setting most of the options for you.

> And is it possible to make 1 line out of these two?

You can probably combine them by putting all the options from the second
curl command-line at the end of the first one.

> Btw, the coding-language is purebasic.

The option names in the --libcurl output will probably look similar. Or,
you could read the PureBASIC libcurl wrapper documentation.

>>> Dan

--              The web change of address service
          Let webmasters know that your web site has moved
Received on 2008-05-08