大家看看。。希望高手能给解决 谢谢了!!!procedure TForm1.Button1Click(Sender: TObject);
var
http:tidhttp;
result:string;
begin
http:=tidhttp.Create(nil);
http.Request.UserAgent:='Mozilla/5.0';
try
result:=http.Get('http://www.netzy8.cn');//这个网站读取的时候就会报错
result:=http.Get('http://www.baidu.com');//读取百度却不会报错。能正常渠道HTML代码 这是为什么呢????
except
if http.Response.ResponseCode=304 then
result:='loction'+http.Response.Location;
end;
http.Free;
memo1.Text:=result;
end;
var
http:tidhttp;
result:string;
begin
http:=tidhttp.Create(nil);
http.Request.UserAgent:='Mozilla/5.0';
try
result:=http.Get('http://www.netzy8.cn');//这个网站读取的时候就会报错
result:=http.Get('http://www.baidu.com');//读取百度却不会报错。能正常渠道HTML代码 这是为什么呢????
except
if http.Response.ResponseCode=304 then
result:='loction'+http.Response.Location;
end;
http.Free;
memo1.Text:=result;
end;
解决方案 »
- 关于DBGridEh v4.4.31合计行的网格填充的实现,请大家帮帮我
- 如何把一个应用程序添加到服务中
- 请教一个关于StringGrid的问题!
- 关于Listview的问题(小弟初来贵地)
- 五笔字型的字根是如何打出来的,并存入数据库中!
- 各位高手,怎么在程序里实现获取各种*.exe文件的图标.
- 在Win2K和NT中如何屏蔽Ctrl+Alt+Del系统热键?依然没有解决!
- 请问用什么API函数锁定Alt+F4键????急!!
- Midas中DataSetProvider怎样给ClientDataSet传送非数据库信息啊?
- 能否将edit/maskedit中的text内容的初值赋为数值型.
- delphi怎样才能不建立连接直接截取到指定端口的数据?
- 有关delphi中数组做函数参数的问题
http.Get('http://www.netzy8.cn');
except
on E: Exception do
MessageBox(HANDLE, PChar(E.Message), '提示', MB_ICONWARNING);
end;看是什么异常信息,一般看提示 网上搜下 就知道原因了
我反正读两个都正常