curl-users
Re: How using multiple files headers (for cookies)
Date: Tue, 15 Jan 2002 13:30:52 +0100 (MET)
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