Action()
{
char Bkey[32];
char Bname[32];
char Bmail[128];
char Bmphone[128];
char Brname[128];
//char Biid[512];
char Baddr[128];
char Bct[128];
char Ms[128];
char Mkey[32];
char s[128];
char url[128];
char * upperstr;
lr_save_string("123456","key");//用户名
lr_save_string("andy","name");//用户名
lr_save_string("
[email protected]","mail");//邮件
lr_save_string("13698745671","mphone");//手机号
lr_save_string("andyguo","rname");//真实姓名
lr_save_string("12345678910","iid");//身份证号
lr_save_string("china","addr");//住址
lr_save_string("123456","ct");//连续方式
GetMd5FromString(lr_eval_string("{key}"),Mkey);
upperstr=(char *)strupr(Mkey);
lr_save_string(Mkey,"skey");
lr_output_message(Mkey);
strcat(s,"a=1k=");
strcat(s,lr_eval_string("{skey}"));
strcat(s,"m=");
strcat(s,lr_eval_string("{mail}"));
strcat(s,"n=");
strcat(s,lr_eval_string("{name}"));
strcat(s,"p=1testtest");
// lr_output_message("%s",s);
GetMd5FromString(s,Ms);
upperstr=(char *)strupr(Ms);
lr_save_string(Ms,"ms");
lr_output_message(lr_eval_string("{ms}"));
GetBase64Encode(lr_eval_string("{skey}"),Bkey);//密码
// lr_output_message(Bkey);
GetBase64Encode(lr_eval_string("{name}"),Bname);//姓名
// lr_output_message(Bname);
GetBase64Encode(lr_eval_string("{mail}"),Bmail);//邮件
// lr_output_message(Bmail);
GetBase64Encode(lr_eval_string("{mphone}"),Bmphone);//手机号
//lr_output_message(Bmphone);
GetBase64Encode(lr_eval_string("{rname}"),Brname);//真实姓名
//lr_output_message(Brname);
// GetBase64Encode(lr_eval_string("{iid}"),Biid);//身份证号
//lr_output_message(Biid);
GetBase64Encode(lr_eval_string("{addr}"),Baddr);//地址
//lr_output_message(Baddr);
GetBase64Encode(lr_eval_string("{ct}"),Bct);//联系方式
//lr_output_message(Bct);
strcat(url,"http://192.168.17.100/UIBI4/gate.jsp?a=1&n=");
strcat(url,Bname);
strcat(url,"&k=");
strcat(url,Bkey);
strcat(url,"&p=1&m=");
strcat(url,Bmail);
strcat(url,"&mp=");
strcat(url,Bmphone);
strcat(url,"&s=");
strcat(url,lr_eval_string("{ms}"));
strcat(url,"&rn=");
strcat(url,Brname);
strcat(url,"&iid=");
strcat(url,lr_eval_string("{iid}"));
strcat(url,"&addr=");
strcat(url,Baddr);
strcat(url,"&ct=");
strcat(url,Bct);
strcat(url,"&ip=192.168.12.232&ps=11");
lr_save_string(url,"ZCurl");
lr_output_message("%s注册URL地址",lr_eval_string("{ZCurl}"));
lr_start_transaction("注册");
/* web_reg_find("Search=Body",
"Text=0",
LAST);*/
web_url("gate.jsp",
"URL={ZCurl}",
"Resource=0",
"RecContentType=text/xml",
"Referer=",
"Snapshot=t1.inf",
"Mode=HTML",
EXTRARES,
LAST);
lr_end_transaction("注册", LR_AUTO);
return 0;
}
其中GetBase64Encode为已经写好的base64的函数调用了一下而已,调用方法在我的博客中已经写过,还有MD5的