函数(sprintf,web_reg_save_param),其中红色字体是本文档最重要的51Testing软件测试网)v4W#DIbw}nU4w
#include "web_api.h"
v$t*\8A x)tS-q7204751Testing软件测试网~ a*E M]7QIw%i8v;X.A
Action()
aVf|0?&Lc1oP/x72047{51Testing软件测试网K|6S+`.|fI
int i,iloop;51Testing软件测试网6?^b8VFW^i1Y
char idParam[200];51Testing软件测试网8wQ2L(Xy
char idValue[200];51Testing软件测试网AN]6D XShl
...51Testing软件测试网C9L4`!J'W3w ^m}
web_reg_save_param("topicarray", "LB=topic_", "RB=.html","Notfound=warning", "Search=body","Ord=All",LAST);51Testing软件测试网WLm;`l+hm
//注意Ord=All51Testing软件测试网'A8v b9Ua8cv*Lw
web_url("访问指定XXX",51Testing软件测试网XRT_k/l^&\C\
"URL=指定要访问的页面",
T(foWv#|t72047"Resource=0",
/f:V1{8\ J4SIK72047"RecContentType=text/html",51Testing软件测试网j;q P5d)I}
"Referer=",
Nj$vc_3{T72047"Snapshot=t1.inf",51Testing软件测试网7AL:ujtQ/r*K'xT
"Mode=HTTP",51Testing软件测试网a4e+k2k9]
LAST);
]'V"v.xS,w%F x+L"Y72047for ( i =1 ; i < atoi(lr_eval_string("{topicarray_count}"))+1; i++){
fDt$~6q)f72047sprintf(idParam, "{topicarray_%d}", i);
tIbR+[ D_72047sprintf(idValue, "%s", lr_eval_string(idParam));
f&s@f1T72047lr_save_string(idValue,"topicid");//这个也比较实用的函数,放入参数,后续调用就比较简单了,51Testing软件测试网x S;je^%i@M0W
lr_message("The value argument is : %s", lr_eval_string("{topicid}"));
HPz@HDr`72047for ( iloop = 0; iloop < 5 ; iloop++){
G9b'd4{,W \K72047web_submit_data("add_reply.do",
KKa~ZvlZ/^x72047"Action=xxxxxxxxxxxx.do",51Testing软件测试网WKn1]/Z X
"Method=POST",
.uTX8^/A:x t72047"RecContentType=text/html",51Testing软件测试网}Q)oac9cL m\5d
"Referer=xxxxxxx_{topicid}.html",51Testing软件测试网/op ~V;A9ol+W g
"Mode=HTTP",
W4Aw8})kB o3L1E:x72047ITEMDATA,51Testing软件测试网1Q0R?cng s&h&QT
"Name=allow_guest", "Value=on", ENDITEM,
,E*G3Avs*x:U0D]72047"Name=url", "Value=xxxxxxxxx{topicid}.html", ENDITEM,
/]`A/j1i4]Ph4}PGj72047"Name=Username", "Value=2007", ENDITEM,51Testing软件测试网eGWg2D
"Name=Title", "Value=null", ENDITEM,
Pe VeZN72047"Name=Content", "Value={topicid}", ENDITEM,51Testing软件测试网4m2T"I l'l,@VTW
"Name=aaaa", "Value=aaa", ENDITEM,
U JL4m6Q.?72047LAST);
+A,F[ Xi#o2KRDL#W72047}
*Oeh5e]"b a72047}