cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: Question on submiting a POST form

From: Doug McNutt <douglist_at_macnauchtan.com>
Date: Sat, 20 Dec 2008 10:06:18 -0700

At 10:18 -0500 12/20/08, Lars Nilsson wrote:
>On Sat, Dec 20, 2008 at 10:01 AM, Q Zhu <zhuq1_at_yahoo.com> wrote:
>> So in other words, curl cannot handle this type of submit button? this is
>> not very encouraging, for me...
>
>I think it's safe to say that curl can send the correct information.
>However, your *actual* problem is to figure what a web browser sends
>*exactly*, using LiveHTTPHeaders, for instance. Once you know what was
>actually sent to the server, disregarding what the html looks like,
>you make curl send identical data using the appropriate options. Keep
>in mind one or more invocations may be necessary to gather up proper
>cookies, etc, before issuing the call of interest.

Submits are sent to javascript code which can provide the name value
and a lot of other stuff which the browser will include in the POST.

Watch for special codes hidden in undisplayed regions of the HTML
document and for cookies that may not be apparent even in LiveHTTP
headers. Javascript can do strange things behind the browser's back.
The last one to give me a fit was Javascript that managed to replace
entire page content by creating a form and reading the data for it
from the server behind the back of LiveHTTP headers.

It's either job security for contract programmers or a serious game
to make sure you read the ads.

-- 
--> A fair tax is one that you pay but I don't <--
-------------------------------------------------------------------
List admin: http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-users
FAQ:        http://curl.haxx.se/docs/faq.html
Etiquette:  http://curl.haxx.se/mail/etiquette.html
Received on 2008-12-20