curl-users
Re: Question on submiting a POST form
Date: Sat, 20 Dec 2008 20:02:42 -0800 (PST)
OK, I am going to make one more attempt here before I compltely give up on this webpage I am working on -:). Here's the output from Live HTTP Header:
http://www.freddiemac.com/mbs/cgi-bin/lookup2.pl
POST /mbs/cgi-bin/lookup2.pl HTTP/1.1
Host: www.freddiemac.com
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.5) Gecko/2008120122 Firefox/3.0.5
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 300
Connection: keep-alive
Referer: http://www.freddiemac.com/mbs/html/sd_pc_lookup.html
Cookie: CP=null*; WSS_MIGRATION=DM5207203KZD:DM54031813DE; ScoutRunningCheck=ScoutClosed; ForeseeLoyalty=35
Content-Type: application/x-www-form-urlencoded
Content-Length: 51
CusipNum=3128K0G49&PoolNum=&Report=DES&TaxYear=2008
HTTP/1.x 200 OK
Date: Sun, 21 Dec 2008 03:37:16 GMT
Server: Apache
Keep-Alive: timeout=15, max=500
Connection: Keep-Alive
Transfer-Encoding: chunked
Content-Type: text/html
----------------------------------------------------------
I tried the -d "CusipNum=3128K0G49&PoolNum=&Report=DES&TaxYear=2008" with the URL page that I am trying to send with curl, http://www.freddiemac.com/mbs/html/sd_pc_lookup.html and still I can't get it to work. Someone mentioned cookies and by looking at this, I have no idea how to deal with that part either...
I apologize in advance if I am violating any rules by using an actual URL page here in this forum and having no clues about at least 90% of the above HTML content -:) I figure what's the worst it could happen since I am ready to give up using any command line tools to send this URL...
Thx again
________________________________
From: Lars Nilsson <chamaeleon_at_gmail.com>
To: the curl tool <curl-users_at_cool.haxx.se>
Sent: Saturday, December 20, 2008 7:18:30 AM
Subject: Re: Question on submiting a POST form
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.
Lars Nilsson
-------------------------------------------------------------------
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
-------------------------------------------------------------------
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-21