curl-users
Re: fill out a post form with cURL
Date: Fri, 16 Feb 2007 14:39:10 -0700
At 11:59 -0800 2/16/07, Guirong Wang wrote:
>Hi, all
>I am new to cURL. I started to learn curl yesterday. I am trying to fill out a form with cURL. The method used by the form is "POST". I used the following cURL command:
>curl -d "user=username&pass=password&submit=submit" ht<https://testsite.com/dir/logproc.asp>tps://testsite.com/dir/logproc.asp
>and I got the following message:
><head><title>Object moved</title></head>
><body><h1>Object Moved</h1>This object may be found here.</body>
>
>Can anybody help me out? Any suggestion is highly appreciated.
Almost surely you're dealing with security issues that are handled quite differently from site to site depending on which side of bed the programmer got up on.
Get the LiveHTTPheaders plug in for the FireFox browser and see what is actually transmitted as the POST from the first page with username and password is sent back. It almost surely has hidden fields that are needed and they may be created with JavaScript or something worse.
At a minimum there will be a cookie used for identification as you make repeated contacts. You'll have to return that too.
If you're on a Macintosh the log file produced by the iCab browser might be more useful than LiveHTTPheaders.
-- --> Love your country. But don't trust its government. <--Received on 2007-02-16