[转] web_reg_save_param得到的数组的处理

上一篇 / 下一篇  2012-01-20 14:07:17 / 个人分类:lr

函数(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 XSh l
...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\ J4SI K72047"RecContentType=text/html",51Testing软件测试网j;q P5d)I }
"Referer=",
Nj$vc _3{T72047"Snapshot=t1.inf",51Testing软件测试网7AL:ujt Q/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);
tIb R+[ D_72047sprintf(idValue, "%s", lr_eval_string(idParam));
f&s@f1T72047
lr_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软件测试网e GWg2D
"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#o2KR DL#W72047}
*Oeh5e]"b a72047}

TAG:

 

评分:0

我来说两句

日历

« 2024-04-23  
 123456
78910111213
14151617181920
21222324252627
282930    

数据统计

  • 访问量: 36548
  • 日志数: 104
  • 建立时间: 2011-10-10
  • 更新时间: 2012-04-12

RSS订阅

Open Toolbar