sid := createhttpsession();
SetHttpMode(sid,1); //分段模式 url := " http://www.baidu.com";
r := GetHttp(url,60000,v,code);
echo "\r\ndone->",r,'->',code,'->',length(v),"\r\n";
echo v;
//分段未结束时GetHttp返回值为1,code值为1000
while r and code=1000 do begin
r := GetHttp(url,60000,v,code);
echo v;
end;
if r <> 1 then return "网页访问失败";
return code;