一次艰难的POST模拟提交,未果。请高手相助。。。

一次艰难的POST模拟提交,未果。请高手相助。。。

今天遇到个POST提交,由于某种需要,需要模拟此次提交,
但是尝试一个上午,没成功,请高手相助。

HTML CODE 如下:

<form action="http://wwwapps.ups.com/WebTracking/summary" method="post">

<INPUT name="HIDDEN_FIELD_SESSION" type="HIDDEN" value="rO0ABXNyAB9jb20udXBzLnNlc3Npb24uSGlkZGVuRmllbGRJbXBsIWGf8vYI9fsMAAB4cHcMAAABGuzvKAUAAACsc3IAEWphdmEudXRpbC5IYXNoTWFwBQfawcMWYNEDAAJGAApsb2FkRmFjdG9ySQAJdGhyZXNob2xkeHA/QAAAAAAADHcIAAAAEAAAAAJ0AAtISURERU5fTElTVHNyABNqYXZhLnV0aWwuSGFzaHRhYmxlE7sPJSFK5LgDAAJGAApsb2FkRmFjdG9ySQAJdGhyZXNob2xkeHA/QAAAAAAACHcIAAAACwAAAAh0ABFOdW1iZXJEZXRhaWxMaW5lc3QAATF0ABFOT1RfQUxMX1NZU19BVkFJTHQABWZhbHNldAAOSW5xdWlyeU51bWJlcjF0ABIxWkU0MFc5MTAzNTQ4NTc0NDF0AA5mcm9tVHJhY2tJbnB1dHQABHRydWV0ABlBZ3JlZVRvVGVybXNBbmRDb25kaXRpb25zdAADeWVzdAATVHlwZU9mSW5xdWlyeU51bWJlcnQAAVR0ABN0cmFja251bXNfZGlzcGxheWVkdAABNXQAEU1VTFRJUExFX1NISVBQRVJTcQB+AAp4dAATVFJBQ0tfREFUQV9MSU5FSVRFTXNxAH4ABT9AAAAAAAAIdwgAAAALAAAAAXQABWxpbmUxdXIAE1tMamF2YS5sYW5nLlN0cmluZzut0lbn6R17RwIAAHhwAAAAQnQACEhBTUlMVE9OdAACS0J0AAJVU3QACDIwMDcwMzA5dAACTkp0AAYxMDM4MDB0AAFEdAADMDAxdAAAcQB+ACNxAH4AI3EAfgAjcQB+ACNxAH4AI3EAfgAjcQB+ACNxAH4AI3EAfgAjcQB+ACNxAH4AI3QACENSQU5CVVJZdAACVVNxAH4AI3EAfgAjcQB+ACN0AAJOSnQABTIwMDEwcQB+ACNxAH4AI3QAAHEAfgAjdAAIMjFiNDI4YmV0AAMsLCx0AAZFNDBXOTFxAH4AI3QABERPQ0t0AAExcQB+ACNxAH4AI3QABDAuMDB0AAB0AAR0ZHRzdAAAdAAAcQB+ACN0AAIxMXQAAHQAAHEAfgArdAAGR1JPVU5EcQB+ACNxAH4AI3EAfgAjdAAGSEFSUklTcQB+ACFxAH4AI3QAAHQAAHQAEjFaRTQwVzkxMDM1NDg1NzQ0MXEAfgAjcQB+ACN0AA84IENPUlBPUkFURSBEUiBxAH4AJHEAfgAmdAAFMDg1MTJxAH4AJXh4eA==A0a0a18b97">

<input type="image" src="http://wwwapps.ups.com/img/glo_ups_brandmark_v2.gif"  name="tdts1">               
<BR>

</form>
</div>

打算用use LWP::UserAgent;的
$ua->post('http://wwwapps.ups.com/WebTracking/summary?tdts1.x=15&tdts1.y=19',
                                          { 'HIDDEN_FIELD_SESSION' => $HIDDEN_FIELD_SESSION,},'Content_Type' => 'form-data',
                                                );

方式模拟,但是当<input type="image" src="http://wwwapps.ups.com/img/glo_ups_brandmark_v2.gif"  name="tdts1">中name和type改变后就失败了。。。


模拟的语言不限制,AJAX都可以的。。。
type="image"??

what is this
一个图片按纽 啊
firefox有个插件叫urlparams,使用它看firefox是如何提交的,然后在用perl做应该就很容易了。
有没有试过..把全部叁数写在某个hash上...
拿掉後面的form_data, $ua会自动帮你填上...
然後像下面一样..传入reference...

另外我没记错的话..应该只有 name与value会传过去...如果你要传image里面的图片...
最後在接收端..另外处理....

QUOTE:
$ua->post( $url, \%form )
$ua->post( $url, \@form )
$ua->post( $url, \%form, $field_name => $value, ... )
$ua->post( $url, $field_name => $value,... Content => \%form )
$ua->post( $url, $field_name => $value,... Content => \@form )
$ua->post( $url, $field_name => $value,... Content => $content )

    This method will dispatch a POST request on the given $url, with %form or @form providing the key/value pairs for the fill-in form content. Additional headers and content options are the same as for the get() method.

    This method will use the POST() function from HTTP::Request::Common to build the request. See HTTP::Request::Common for a details on how to pass form content and other advanced features.

http live header也可
主要是urlparams稍微简单一点