web_get_int_property()
函數用途:
記錄http響應的資訊
函數屬性:
HTTP_INFO_RETURN_CODE: 傳回http代碼
HTTP_INFO_DOWNLOAD_SIZE: 傳回頁面位元組數
HTTP_INFO_DOWNLOAD_TIME: 傳回頁面下載下傳時間
例子:
Action()
{
//設定自定義變量
int HttpRetCode;
int HttpRetSize;
int HttpRetTime;
//打開頁面
web_url("綠色資源網",
"URL=http://www.downcc.com",
"TargetFrame=",
"Resource=0",
"Referer=",
LAST);
//擷取HTTP響應資訊
HttpRetCode = web_get_int_property(HTTP_INFO_RETURN_CODE);
HttpRetSize = web_get_int_property(HTTP_INFO_DOWNLOAD_SIZE);
HttpRetTime = web_get_int_property(HTTP_INFO_DOWNLOAD_TIME);
//設定檢查點
if (HttpRetCode==200) {
lr_log_message("綠色資源網傳回成功!!");
lr_log_message("downcc傳回HTTP_INFO_RETURN_CODE:%d", HttpRetCode);
lr_log_message("downcc傳回HTTP_INFO_DOWNLOAD_SIZE:%d", HttpRetSize);
lr_log_message("downcc傳回HTTP_INFO_DOWNLOAD_TIME:%d", HttpRetTime);
} else {
lr_log_message("downcc傳回失敗:%d", HttpRetCode);
}
return 0;
}