|
5#
楼主 |
发表于 2006-9-15 04:13:10
|
只看该作者
已经搞定
//设置参数的最大长度,注意该值必须大于文件的大小
web_set_max_html_param_len("20000");
//获取响应的全部内容,作为文件内容保存
web_reg_save_param("fcontent", "LB=", "RB=", "SEARCH=BODY", LAST);
web_url("getcode.asp",
"URL=http://www.bellting.net/common/getcode.asp",
"Resource=0",
"RecContentType=text/html",
"Referer=http://www.bellting.net/article.asp?id=451",
"Snapshot=t3.inf",
"Mode=HTML",
EXTRARES,
"Url=../skins/miracle/bar.gif", "Referer=http://www.bellting.net/article.asp?id=451", ENDITEM,
"Url=../skins/miracle/foot.gif", "Referer=http://www.bellting.net/article.asp?id=451", ENDITEM,
LAST);
//获取响应中的文件长度
flen = web_get_int_property(HTTP_INFO_DOWNLOAD_SIZE);
if(flen > 0)
{
//以写方式打开文件
if((filedes = fopen("c:\\code.bmp", "wb")) == NULL)
{
lr_output_message("Open File Failed!");
return -1;
}
//写入文件内容
fwrite(lr_eval_string("{fcontent}"), flen, 1, filedes);
//关闭文件
fclose(filedes);
} |
|