|
web_submit_data("pay.do",
"Action=http://ip地址/TengRen/pay.do?p=dopay",
"Method=POST",
"RecContentType=text/html",
"Referer=http://ip地址/TengRen/billing/pay/pay_card.jsp",
"Snapshot=t16.inf",
"Mode=HTML",
ITEMDATA,
"Name=vcode", "Value=1234", ENDITEM,
"Name=username", "Value=test0100", ENDITEM,
"Name=username2", "Value=test0100", ENDITEM,
"Name=cp01", "Value=V0XDY", ENDITEM,
"Name=cp02", "Value=4IJB3", ENDITEM,
"Name=cp03", "Value=QYQ8E", ENDITEM,
"Name=cp04", "Value=6LF5I", ENDITEM,
"Name=source", "Value=", ENDITEM,
"Name=paytype", "Value=1", ENDITEM,
"Name=cardtype", "Value=1", ENDITEM,
LAST);
现在cp01到cp04的内容是一个参数{card}
格式如V0XDY4IJB3QYQ8E6LF5I,20位.
我现在要把这个参数拆分成4个,所以我写了如下程序
char cp[20];char cp1,cp2,cp3,cp4;
lr_save_string(lr_eval_string("{card}"),"cp");
cp1=cp[0]&cp[1]&cp[2]&cp[3]&cp[4];
cp2=cp[5]&cp[6]&cp[7]&cp[8]&cp[9];
cp3=cp[10]&cp[11]&cp[12]&cp[13]&cp[14];
cp4=cp[15]&cp[16]&cp[17]&cp[18]&cp[19];
web_submit_data("pay.do",
"Action=http://ip地址/TengRen/pay.do?p=dopay",
"Method=POST",
"RecContentType=text/html",
"Referer=http://ip地址/TengRen/billing/pay/pay_card.jsp",
"Snapshot=t16.inf",
"Mode=HTML",
ITEMDATA,
"Name=vcode", "Value=1234", ENDITEM,
"Name=username", "Value=test0100", ENDITEM,
"Name=username2", "Value=test0100", ENDITEM,
"Name=cp01", "Value=(cp1)", ENDITEM,
"Name=cp02", "Value=(cp2)", ENDITEM,
"Name=cp03", "Value=(cp3)", ENDITEM,
"Name=cp04", "Value=(cp4)", ENDITEM,
"Name=source", "Value=", ENDITEM,
"Name=paytype", "Value=1", ENDITEM,
"Name=cardtype", "Value=1", ENDITEM,
LAST);
没有报错,但是就是不成功,不知道我哪里错了.谁能帮我看一下啊? |
|