web_submit_data("login.pl",
"Action=http://127.0.0.1:1080/WebTours/login.pl",
"Method=POST",
"RecContentType=text/html",
"Referer=http://127.0.0.1:1080/WebTours/nav.pl?in=home",
"Snapshot=t9.inf",
"Mode=HTTP",
ITEMDATA,
"Name=userSession", "Value={WCSParam_Diff1}", ENDITEM,
"Name=username", "Value={Username}", ENDITEM,
"Name=password", "Value=123456", ENDITEM,
"Name=JSFormSubmit", "Value=off", ENDITEM,
"Name=login.x", "Value=30", ENDITEM,
"Name=login.y", "Value=16", ENDITEM,
LAST);
status = web_submit_data("login.pl",
"Action=http://127.0.0.1:1080/WebTours/login.pl",
"Method=POST",
"RecContentType=text/html",
"Referer=http://127.0.0.1:1080/WebTours/nav.pl?in=home",
"Snapshot=t9.inf",
"Mode=HTTP",
ITEMDATA,
"Name=userSession", "Value={WCSParam_Diff1}", ENDITEM,
"Name=username", "Value={Username}", ENDITEM,
"Name=password", "Value=123456", ENDITEM,
"Name=JSFormSubmit", "Value=off", ENDITEM,
"Name=login.x", "Value=30", ENDITEM,
"Name=login.y", "Value=16", ENDITEM,
LAST);
if (status == LR_FAIL) {
lr_error_message("错误信息:%s","不能正常登录!");
return -1;
}
为什么我把登录的密码改成错误的 程序不走if里的语句? 这样判断登录成功对否? |