您好,登錄后才能下訂單哦!
做個速記,以百度搜索為例。
void EncodePlainToURL(char *original, const char * output_param_name) { //將字符串編碼轉為UTF-8 lr_convert_string_encoding(original, LR_ENC_SYSTEM_LOCALE, LR_ENC_UTF8, "strUTF8"); //去掉C數組后面的null終止符 lr_save_string(lr_eval_string("{strUTF8}"), output_param_name); //將UTF-8字符串URL encode web_convert_param(output_param_name, "SourceEncoding=PLAIN", "TargetEncoding=URL", LAST); } Action() { lr_output_message("******keyword: %s", lr_eval_string("{keyword}")); EncodePlainToURL(lr_eval_string("{keyword}"), "newKeyWord"); lr_output_message("***newKeyWord: %s", lr_eval_string("{newKeyWord}")); web_url("s", "URL=http://www.baidu.com/s?wd={newKeyWord}&rsv_bp=0&rsv_spt=3&ie=utf-8&rsv_sug3=4&inputT=826", "Resource=0", "RecContentType=text/html", "Referer=http://www.baidu.com/", "Snapshot=t2.inf", "Mode=HTML", EXTRARES, LAST); return 0; }
*** walker ***
免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。