|
登陆页面需要填写用户名、密码、验证码(已经让开发改为固定的),还有一个随机码(刷新时更新的)。
打印关联变量的值,是可以取到的,但是登陆是失败的,随机码没取到吗?求高手指点!!
下面是登陆脚本:
char * getid;
web_url("XBRLT_QYB",
"URL=http://192.168.18.210/XBRLT_QYB",
"Resource=0",
"RecContentType=text/html",
"Referer=",
"Snapshot=t1.inf",
"Mode=HTML",
LAST);
web_reg_save_param("tokenID",
"LB=<input name=\"token\" type=\"hidden\" value=",
"RB=/>",
"Ord=All",
"Search=Body",
LAST);
web_url("gotoLoginPage.login",
"URL=http://192.168.18.210/XBRLT_QYB/web/gotoLoginPage.login",
"Resource=0",
"RecContentType=text/html",
"Referer=",
"Snapshot=t2.inf",
"Mode=HTML",
LAST);
/*下面是要用关联取到的值登陆*/
getid=lr_paramarr_random("tokenID");
lr_output_message("Value=%s",getid);
lr_save_string(getid,"strid");
......
/*登陆脚本*/
web_submit_data("jqq_aceqqgi_securwrrity_chrwreck",
"Action=http://192.168.18.210/XBRLT_QYB/web/jqq_aceqqgi_securwrrity_chrwreck",
"Method=POST",
"RecContentType=text/html",
"Referer=http://192.168.18.210/XBRLT_QYB/web/gotoLoginPage.login",
"Snapshot=t4.inf",
"Mode=HTML",
ITEMDATA,
"Name=username", "Value={username}", ", ENDITEM,
"Name=password", "Value={psd}", ENDITEM,
"Name=rand", "Value=1234", ENDITEM,
"Name=token", "Value={strid}", ENDITEM,
............... |
|