cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: Text Game Login

From: Alessandro Vesely <vesely_at_tana.it>
Date: Sat, 17 Nov 2007 10:22:00 +0100

Ben wrote:
> the login form does a POST to /index.php?controller=sessions&action=create
> the forum contains the following fields: player, password, world
> It looks to me like what happens is, you fill out the form, do the post
> and are then redirected here: 213.203.194.123/us/1/index.php
> <http://213.203.194.123/us/1/index.php> after a session id has been created.

Probably the server expects to get that session id back. How?

> I'm fairly new to curl, but after doing some research, I'm not quite
> sure why the following doesn't work:
>
> curl -LF
> "controller=sessions;action=create;player=<playername>;password=<mypassword>;world=<myworld>;remember=1"
> inselkampf.com/index.php <http://inselkampf.com/index.php> --max-redirs
> 3 --referer inselkampf.com <http://inselkampf.com> --trace-ascii curl.log

Did you try setting a cookie jar (opts -b -c)? If that's how the session id
is supposed to pass, you need it. An easy way to learn what headers (including
cookies) are being passed, if you use FireFox, is to install and enable
liveHTTPheaders.
Received on 2007-11-17