cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Help translate CURL to libcurl please

From: Dan Fandrich <dan_at_coneharvesters.com>
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 http://www.xxxxx.com/public/xxxxx.html
>
> the second one gets the files with sending the cookie stored before.
> curl --cookie cookie.txt -o xxxxx.rar --referer http://www.xxxxx.com/public/
> xxxxx.html http://www.xxxxxx.com/public/view/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
> PLEASE, PLEASE help?

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

-- 
http://www.MoveAnnouncer.com              The web change of address service
          Let webmasters know that your web site has moved
Received on 2008-05-08