cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: Problem logging into website

From: Dan Fandrich <dan_at_coneharvesters.com>
Date: Thu, 25 Oct 2012 21:08:05 +0200

On Thu, Oct 25, 2012 at 01:55:04PM -0400, Trevor Barrie wrote:
> Novice curl user here, hoping I could get some help. I need to write a
> script to log into http://www.ghcommunity.info/maintenance/ but I
> can't get it to work.
[...]
> Based on that I tried
>
> curl -F "user[login]=XXX&user[password]=YYY"
> http://ghcommunity.info/maintenance/login/login
>
> But it just gave me a message that I was being redirected to the login page.

Often in cases like this, the site sets a cookie on the home page that
has to be sent along with the request. However, in this case it's
probably because you're using the -F option instead of a plain -d. They
create completely different kinds of POST data.

>>> Dan
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-users
FAQ: http://curl.haxx.se/docs/faq.html
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2012-10-25