curl-users
Re: cURL - Sessions?
Date: Wed, 20 Aug 2008 23:33:28 +0200
Hi,
thanks for your Answer Dan. In fact, you are right, I tried it, and had
already tried it, but it was exactly there where the problem was. The -c was
wrong, but with the -b, I have the problem with the session.
So, do you have any idea how I can "store" this session id?
Thanks for your support,
Laurent
On Wednesday 20 August 2008 23:22:16 Dan Fandrich wrote:
> On Wed, Aug 20, 2008 at 10:58:12PM +0200, Kabel wrote:
> > Well, I managed to establish the connection to the site, store the
> > cookies and transmit the data to the next page using post.
> > I only have a lot of problems with the session, in fact, I use twice a
> > curl command, so that the session id isn't preserved and I get a bad
> > answer from the site.
> >
> > Here my (little bit modified commands):
> >
> > #curl --cookie-jar cookies.txt --user-agent
> > Mozilla/4.0 --data
> > "destination=more-info.php&credential_0=tweety&credential_1=mySecretPass"
> > http://url.com/login -v -k -D /home/tweety/Desktop/header.txt
> >
> > and just after (to procede to the next page):
> > #curl -c cookies.txt --user-agent Mozilla/4.0 http://url.com/page2 -v
>
> This command uses -c which writes any new cookies to the file. You need to
> add -b to read the cookies written by the first command.
>
> >>> Dan
-------------------------------------------------------------------
List admin: http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-users
FAQ: http://curl.haxx.se/docs/faq.html
Etiquette: http://curl.haxx.se/mail/etiquette.html
- application/pgp-signature attachment: This is a digitally signed message part.