没人会的问题:idhttp1控件,请高手指点!!!(50分)

  • 主题发起人 zhoumiao
  • 开始时间
Z

zhoumiao

Unregistered / Unconfirmed
GUEST, unregistred user!
[:(]idhttp1控件如何才能得到大富翁页面htm代码
例如我要取http://www.delphibbs.com/delphibbs/dispq.asp?lid=3879854内容,但什么都取不到,其他网址一般都行,源码如下:
function GetWebPageHTML(URL: string): string;
var
IDHTTP: TIDHttp;
begin
Result:= '';
IDHTTP:= TIDHTTP.Create(nil);
try
try
idhttp.HandleRedirects:= true; //必须支持重定向否则可能出错
idhttp.ReadTimeout:= 20000; //超过这个时间则不再访问
Result:= IDHTTP.Get(URL);//取得网页内容
except
end;
finally
IDHTTP.Free;
end;
end;

procedure TForm1.Button1Click(Sender: TObject);
begin
memo1.text:=getwebpagehtml('http://www.delphibbs.com/delphibbs/dispq.asp?lid=3879854');
end;
请高手指点!!!
 
要登录吧
 

Similar threads

S
回复
0
查看
3K
SUNSTONE的Delphi笔记
S
S
回复
0
查看
2K
SUNSTONE的Delphi笔记
S
I
回复
0
查看
756
import
I
顶部