curl-users
RE: How using multiple files headers (for cookies)
Date: Tue, 15 Jan 2002 10:28:44 -0500
Sounds like a job for the new cookie jar feature...
curl -c cky_jar URL1
curl -c cky_jar URL2
curl -c cky_jar URL3
--Kevin
-----Original Message-----
From: Daniel Stenberg [mailto:daniel_at_haxx.se]
Sent: Tuesday, January 15, 2002 7:31 AM
To: I_ P_
Cc: Curl Mailinglist
Subject: Re: How using multiple files headers (for cookies)
On Tue, 15 Jan 2002, I_ P_ wrote:
> I execute two curl command (1,2) to get the headers in http (option
-D).
> The third curl command (3) use 2 cookies that is creating in 1 and 2
curl
> command. Which is the option for curl to use these 2 headers? In curl
> command 3 I need also a new cookie,that is setting in javascript(I
know the
> name and value because I saw it the javascript code). How can I set in
curl
> command a new cookie?
The -b option that takes a file with cookies can (currently) only be
used
once on the command line, so if you don't wanna concatenate both files
into a
third using:
$ cat file1 file2 > file3
$ curl -b file3 [URL]
You also have the option to tell curl to get the -b file from stdin like
this:
$ cat file1 file2 | curl -b @- [URL]
And to add your own custom cookie, that is added with "-b
variable=contents"
or if you wanna set several cookies "-b var1=cont1;var2=cont2;".
-- Daniel Stenberg -- curl groks URLs -- http://curl.haxx.se/Received on 2002-01-15