Delphi中idHttp获取网页源文件
来源:互联网 发布:淘宝养小号 编辑:程序博客网 时间:2024/05/16 23:56
procedure TForm1.Button1Click(Sender: TObject);
var
pageStr: string;
begin
with IdHTTP1.Request do begin
IdHTTP1.HandleRedirects := true; //使用Idhttp.Post时,出现 HTTP/1.1 302 FOUND 错误,地址自动转向。
ContentType := 'application/x-www-form-urlencoded';
UserAgent := 'Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 2.0.50727)';
end;
try
pageStr:=IdHttp1.Get('http://www.renyuansoft.com');
except
Showmessage('Network Error!');
Exit;
end;
Memo1.text := pageStr;
end;
var
pageStr: string;
begin
with IdHTTP1.Request do begin
IdHTTP1.HandleRedirects := true; //使用Idhttp.Post时,出现 HTTP/1.1 302 FOUND 错误,地址自动转向。
ContentType := 'application/x-www-form-urlencoded';
UserAgent := 'Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 2.0.50727)';
end;
try
pageStr:=IdHttp1.Get('http://www.renyuansoft.com');
except
Showmessage('Network Error!');
Exit;
end;
Memo1.text := pageStr;
end;
- Delphi中idHttp获取网页源文件
- Delphi 用idhttp 获取网页源码
- Delphi IDhttp 获取Cookie
- Delphi IDhttp 获取Cookie
- Delphi IDhttp 获取Cookie
- DELPHI读取网页源文件和获取字符串
- DELPHI读取网页源文件和获取字符串
- delphi 7中使用idhttp抓取网页 解决假死现象
- 使用 idHTTP 获取 UTF-8 编码的中文网页 - 回复同学 "Delphi学习者" 的问题
- Delphi使用IdHttp 获取 HttpsURL内容
- C#获取网页源文件
- java获取网页源文件
- 关于在网页上获取信息.idhttp
- idhttp用代理IP获取网页源码
- idhttp + TImage 获取网页验证码
- IDHTTP获取网页的内容或源码
- C# Winform 应用程序中,获取某网页的源文件
- delphi利用idhttp+IdSSLIOHandlerSocketOpenSSL 访问https网页的方法
- C++ static、const和static const 以及它们的初始化
- 十天学会Div+CSS第三天之【二列和三列布局】
- ubuntu 安装 Sublime Text 2
- yii知识点整理
- Miller-Rabbin随机性素数测试算法
- Delphi中idHttp获取网页源文件
- SQLServer性能优化 .net开发菜鸟总结
- C++11 中值得关注的几大变化(详解)
- 怎样格式化dbms_metadata.get_ddl存储过程的输出?
- HDU 1142 A Walk Through the Forest
- 【算法学习笔记】KMP算法之构造回溯表(backtrack table)的思路和技巧
- Juggling算法
- AndroidManifest.xml配置文件详解
- Log4Net详解(1)简单应用