cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: login on webpage with curl?

From: Ralph Mitchell <ralphmitchell_at_gmail.com>
Date: Thu, 12 Oct 2006 11:12:56 -0500

On 10/12/06, most wanted <most.wanted_at_gmx.at> wrote:
> is it possible with curl to login on a form on a specific webpage with
> someones username and password?

Certainly it's possible. I do it all the time. You need to download
the form page, extract the form elements, edit in the userid, password
and anything else required, then post it back. Don't forget to keep
track of cookies.

Some pages do magic tricks with javascript, and emulating those is no
errand for the fainthearted, but it can still be done.

You might want to start by installing the LiveHTTPHeaders extention in
Firefox and using that to track the flow of page requests back and
forth. That way you'll be able to see how to make up your curl
requests to perform the same login.

Ralph Mitchell
Received on 2006-10-12