- 论坛徽章:
- 0
|
页面部分内容如下
- <div class="txd">
- <form name="comment_form" method="post" action="add_comment"> [color=Blue]### <- here action... ###[/color]
- <div style="display:none;">
- <input type="hidden" name="ck" value="J2NL"/>
- </div>
- <textarea id="last" name="rv_comment" rows="8" cols="54"></textarea><br/>
- <input type="hidden" name="start" value="0"/>
- <input type="submit" value="Submit"/>
- </form>
- </div>
复制代码
我想对此在textarea中提交一点内容.
以下是我的方案:
- use LWP;
- use LWP::Simple;
- use HTTP::Cookies;
- my $ua = LWP::UserAgent -> new();
- my $my_url = "http://www.***.com";
- #......#
- my $resp = $ua->post(
- "$my_url/add_comment", [color=Blue]### <-- here ###[/color]
- [
- 'ck' => "J2NL",
- 'rv_comment' => "auto test",
- 'start' => "0"
- ]
- );
复制代码
代码能成功执行,但不知道为什么,内容并没有成功提交上去。(页面登陆时用户名和密码都能成功提交的)
返回的 $resp->status_lines 是 302 Found
请各位大侠帮忙,我该如何针对那段内容来提交?{
-----------------------------------------------------------------
感谢版主的提议,通过抓包分析并更正了错误。
[ 本帖最后由 alvinrxg 于 2009-12-28 04:52 编辑 ] |
|