h**v 发帖数: 2010 | 1 一个网站有个form,填一些textbox输入值提交出去到一个php页面返回结果。如果我想
写个程序模拟输入值,然后监控最后返回的结果页面(email给自己也行),应该怎么
做呢?哪种编程方法最方便? | c***c 发帖数: 21374 | 2 php,perl,jsp等等都可以
如果用perl,参考http://safari.oreilly.com/0596003137/perlckbk2-CHP-20
如果php,参考http://safari.oreilly.com/0596101015/phpckbk-CHP-13
【在 h**v 的大作中提到】![](/moin_static193/solenoid/img/up.png) : 一个网站有个form,填一些textbox输入值提交出去到一个php页面返回结果。如果我想 : 写个程序模拟输入值,然后监控最后返回的结果页面(email给自己也行),应该怎么 : 做呢?哪种编程方法最方便?
| q**1 发帖数: 193 | 3 You should first check the source of that page and see what's the
HTTP method.
1) If it's "GET", thing is easy, group and write your form-data into url, and
use any Linux tools that can grab HTML source like lynx, curl et.al and
then pipe the result out to mail, i.e.
lynx -source http://example.com/form.php?a=1&b=2 | mail .....
2) If it's "POST", you may want to use some programming stuff. since it's
kind of a web-crawling-like thing, Perl might be a good choice. check the
documentation for th
【在 h**v 的大作中提到】![](/moin_static193/solenoid/img/up.png) : 一个网站有个form,填一些textbox输入值提交出去到一个php页面返回结果。如果我想 : 写个程序模拟输入值,然后监控最后返回的结果页面(email给自己也行),应该怎么 : 做呢?哪种编程方法最方便?
| h**v 发帖数: 2010 | | h**v 发帖数: 2010 | 5 多谢多谢
and
【在 q**1 的大作中提到】![](/moin_static193/solenoid/img/up.png) : You should first check the source of that page and see what's the : HTTP method. : 1) If it's "GET", thing is easy, group and write your form-data into url, and : use any Linux tools that can grab HTML source like lynx, curl et.al and : then pipe the result out to mail, i.e. : lynx -source http://example.com/form.php?a=1&b=2 | mail ..... : 2) If it's "POST", you may want to use some programming stuff. since it's : kind of a web-crawling-like thing, Perl might be a good choice. check the : documentation for th
|
|