Action() { /* WEB_URL 模拟浏览器发出get请求 */ web_url("open","url=http://192.168.50.131:7034/",LAST); /* web_submit_data 模拟浏览器发出get/post请求 */ web_submit_data("web_submit_data", "Action=http://192.168.50.131:7034/VirAccount/LoginSub", "Method=POST", "TargetFrame=", "Referer=", "Mode=HTML", ITEMDATA, "Name=usernameOrEmailAddress", "Value={Username}", ENDITEM, "Name=password", "Value={PWD}", ENDITEM, "Name=rememberMe", "Value=true", ENDITEM, "Name=isValidateLogin", "Value=0", ENDITEM, LAST); /* web_custom_request(); 模拟浏览器发出HTTP支持的任何方式的请求 */ web_custom_request("web_custom_request", "URL=http://192.168.50.131:7034/VirAccount/LoginSub", "Method=POST", "TargetFrame=", "Resource=0", "Referer=", "Mode=HTML", "Body=usernameOrEmailAddress=laoshi001&password=111111&rememberMe=true&returnurl=&vertifyInput=&isValidateLogin=0", LAST); /* 输出内容:lr_output_message 获取参数值:(lr_eval_string()) 返回值类型: */ lr_output_message(lr_eval_string("{Username}")); return 0; }
1、使用web_rul函数打开网站
2、登录操作
web_custom_request函数