cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: how to get redirect cookie with curl

From: Dan Fandrich <dan_at_coneharvesters.com>
Date: Wed, 6 Jun 2007 10:18:59 -0700

On Wed, Jun 06, 2007 at 09:56:48AM -0700, Guirong Wang wrote:
> Thank you very much Dan and Daniel for your quick reply.
> >It's likely that the cookie is being set somewhere using JavaScript. That's
> >about the only option when there are redirects between sites, since cookies
> >arn't be passed between domains otherwise.
>
> Does this mean there is no way to get redirect?

You should verify this first--just look at the HTML source for the login page
and the redirected page and see if this assumption is true. If so, it's going
to be difficult to automate. You could use curl in conjunction with a
standalone JavaScript interpreter to tease the cookie out, or if you want
to play loose and fast, you could try applying some regular expressions
against the page and be prepared for it to fail if the site changes its
layout. Is this a publically-accessible site?

>>> Dan

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