|
sprintf(tmp,lr_eval_string("{sessionkey_logon}"));
lr_message(tmp);
sessionkey_tmp=(char *)strtok(tmp,"\"");
if(!sessionkey_tmp) {
lr_output_message("No tokens found in string!");
return( -1 );
}
i=0;
while( sessionkey_tmp != NULL ) { /* While valid tokens are returned */
lr_output_message( " %s", sessionkey_tmp );
i++;
sessionkey_tmp = (char *)strtok(NULL, "\""); /* Get the next token */
lr_output_message( " %s", sessionkey_tmp );
if(1==i) sprintf(sessionkey_logon,"%s",sessionkey_tmp);
}
lr_message("a=%s",sessionkey_logon);
web_custom_request("dataengine",
"URL={url}/servlet/dataengine",
"Method=POST",
"Resource=0",
"RecContentType=text/xml",
"Referer={url}/am/logon.jsp",
"Snapshot=t3.inf",
"Mode=HTML",
"EncType=",
"Body=<?xml version=\"1.0\" encoding=\"UTF-8\"?><Request sessionKey=\"%s\"><Command id=\"logon\" action=\"\"><Datasets></Datasets><Records></Records><SubmitForm><Input id=\"username\" value=\"000001\" /><Input id=\"password\" value=\"\" /></SubmitForm></Command></Request>",sessionkey_logon,
LAST);
我这样替换有问题,不知道正确的应该是什么样的?
[ 本帖最后由 xingcyx 于 2006-10-12 13:13 编辑 ] |
|