cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: Problem logging in to website

From: Daniel Stenberg <daniel-curl_at_haxx.se>
Date: Mon, 3 May 2004 20:23:57 +0200 (CEST)

On Mon, 3 May 2004, Gary wrote:

> so I started my script like this
> curl -d "username=my_at_emailaddress&password=mypassword&submit1=login%20%20&gt;" www.footiemanager.com/validate.asp \
> --cookie-jar site.cookies \
> -o site.html
>
> but the response I get to this (i.e. the contents of site.html) is
>
> <html><head><title>Object moved</title></head><body><h1>Object
> Moved</h1>This object may be found here.</body></html>
>
> Huh?! Did I do something wrong? If so, what might that be, please? I'm a
> real newbie at this, so please go gently!

Ok, then start with making a habit to inspect the response-headers, not just
the response-body (the part that contains the HTML).

If you use -v (or -i) in the command line above, it is very likely that you'll
notice a Location: header. If you want curl to "follow" that hint, use -L on
the command line as well.

That "&gt;" might be differently sent by a browser, but I'm not 100% sure.

-- 
     Daniel Stenberg -- http://curl.haxx.se -- http://daniel.haxx.se
      Dedicated custom curl help for hire: http://haxx.se/curl.html
Received on 2004-05-03