curl-users
Re: help!, bad html form data
Date: Sat, 17 Aug 2002 08:43:05 -0700 (PDT)
Dan,
Im still stumped on this one. Heres my info.
Im using: curl/7.9.8 (win32) libcurl 7.9.8 (OpenSSL 0.9.6d), inside a Active State Perl script. I have curl successfully navigating several pages of the site, however this curl call page simply returns the previous web page-it appears the .jsp on server doesnt do anything. I can use IE brower to do this stuff -no prob.
FORM Fields extracted :(below)
<form action="/upgrade_results.jsp" method=POST>
<br>
Confirmation number: XFWU3Z DAB - ATL August 18, 2002<br><input type='hidden' name='sessionid' value=</font>
<INPUT TYPE=HIDDEN NAME=NUM_OF_SEG VALUE=4>
<INPUT TYPE=HIDDEN NAME=UPGRADE_CLASS_1 VALUE=V>
<INPUT TYPE=HIDDEN NAME=SEGMENT_NUMBER_1 VALUE=1>
<INPUT TYPE=HIDDEN NAME=pnr VALUE=XFWU3Z>
<INPUT TYPE=HIDDEN NAME=cmd VALUE=upgrade>
PV5f1QIbEiw8YzSGwUfp62I2rHDeUhCbokPdnLmDtxpj6oKmvz5G>
<INPUT TYPE=checkbox NAME=UPGRADE_STATUS_1 VALUE=Available>
My CURL Logic: (below)
$curlcall="curl --trace dump2.txt -A Mozilla/4.0 -v -b headers -d ";
$upgraded = sprintf "%s%s%s%s%s%s%s%s%s%s%s",($curlcall, "'sessionid'=UPGRADE_CLASS_1=V&",
"NUM_OF_SEG=",$num_seg,"&SEGMENT_NUMBER_1=1&","pnr=",$pnr,"&cmd=upgrade", "&UPGRADE_STATUS_1=Available", " --url " ,$result_url);
print "\ncurl->", $upgraded, "\n";
open(WEBGET5, "$upgraded|") ||
die "Couldn't get Selected Locator web page for some reason";
while(<WEBGET5>) {
$line6 = $_;
push @indoc, $line6;
$in=$in.$line6;
}
close(WEBGET5);
# --------write to file -----------------------
open(UPG2, ">upgraded3.txt");
print UPG2 $in;
close(UPG2);
Maybe Im missing something?? I tried encoding the </font with hex ie. %XX but curl blow up. Any ideas? thanks CarlS
Daniel Stenberg wrote:On Fri, 16 Aug 2002, mrjosh at yahoo wrote:
Please don't take this off the mailing list.
> IE did apparently send the form like this, the my asp server simply read
> the values and returned to my browser. the values i received were in html
> with [] around the values-(below). Notice that the > some how. Im wondering if this just isnt some clever way to stop the form
> from being scriptable? - CarlS
I don't think so, as it passed the '' just like it was supposed. Well
maybe, but it wasn't really a very clever way in that case. ;-)
So, you just make sure that sessionid passes that and it should be fine...?
-- Daniel Stenberg - http://daniel.haxx.se - +46-705-44 31 77 ech`echo xiun|tr nu oc|sed 'sx\([sx]\)\([xoi]\)xo un\2\1 is xg'`ol --------------------------------- Do You Yahoo!? HotJobs, a Yahoo! service - Search Thousands of New Jobs ------------------------------------------------------- This sf.net email is sponsored by: OSDN - Tired of that same old cell phone? Get a new here for FREE! https://www.inphonic.com/r.asp?r=sourceforge1&refcode1=vs3390Received on 2002-08-17