idhttp获取验证码范例
来源:互联网 发布:我赢职场java视频网盘 编辑:程序博客网 时间:2024/05/29 14:18
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, IdBaseComponent, IdComponent, IdTCPConnection, IdTCPClient, IdHTTP,
StdCtrls, jpeg // Delphi 提示找不到这个单元文件,晕, GIFImage //这个单元要自己手动添加的,不自带, WinInet;
type
TForm1 = class(TForm)
IdHTTP1: TIdHTTP;
Button1: TButton;
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.Button1Click(Sender: TObject);
const
// url = 'http://ptlogin2.qq.com/getimage?aid=15000701&0.9129723031485226';
url='http://www.0zer.cn/function/c_validcode.asp?name=loginvalid';
var
ms: TMemoryStream;
//jpg: TJPEGImage;
te: TGIFImage;
begin
ms := TMemoryStream.Create;
//jpg := TJPEGImage.Create;
te:=TGIFImage.Create;
if InternetGetConnectedState(nil,0) then //检测计算机是否联网需要引用WinInet
begin
IdHTTP1.Get(url, ms);
ms.Position := 0;
//jpg.LoadFromStream(ms);
te.LoadFromStream(ms);
Canvas.Draw(10, 10, te);
end
else
begin
ShowMessage('错误');
//jpg.Free;
te.Free;
ms.Free;
end;
end;
end.
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, IdBaseComponent, IdComponent, IdTCPConnection, IdTCPClient, IdHTTP,
StdCtrls, jpeg // Delphi 提示找不到这个单元文件,晕, GIFImage //这个单元要自己手动添加的,不自带, WinInet;
type
TForm1 = class(TForm)
IdHTTP1: TIdHTTP;
Button1: TButton;
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.Button1Click(Sender: TObject);
const
// url = 'http://ptlogin2.qq.com/getimage?aid=15000701&0.9129723031485226';
url='http://www.0zer.cn/function/c_validcode.asp?name=loginvalid';
var
ms: TMemoryStream;
//jpg: TJPEGImage;
te: TGIFImage;
begin
ms := TMemoryStream.Create;
//jpg := TJPEGImage.Create;
te:=TGIFImage.Create;
if InternetGetConnectedState(nil,0) then //检测计算机是否联网需要引用WinInet
begin
IdHTTP1.Get(url, ms);
ms.Position := 0;
//jpg.LoadFromStream(ms);
te.LoadFromStream(ms);
Canvas.Draw(10, 10, te);
end
else
begin
ShowMessage('错误');
//jpg.Free;
te.Free;
ms.Free;
end;
end;
end.
- idhttp获取验证码范例
- idhttp + TImage 获取网页验证码
- C#验证码本地获取范例
- Idhttp Post 模拟提交验证码
- Delphi IDhttp 获取Cookie
- Delphi IDhttp 获取Cookie
- Delphi IDhttp 获取Cookie
- idhttp
- php 验证码实现范例 smarty html
- jcaptcha图片验证码使用范例
- 验证码的简单应用范例
- DELPHI 通过idhttp实现登录验证
- 关于在网页上获取信息.idhttp
- idhttp用代理IP获取网页源码
- Delphi中idHttp获取网页源文件
- Delphi使用IdHttp 获取 HttpsURL内容
- Delphi 用idhttp 获取网页源码
- IDHTTP获取网页的内容或源码
- RtlAdjustPrivilege提权后NtRaiseHardError制造系统蓝屏
- 用C#实现HTTP协议下的多线程文件传输
- C# 中的类型转换
- Windows XP搜索功能无法使用
- 执行第一maven用例出错:Unknown lifecycle phase "complile".
- idhttp获取验证码范例
- PHP高并发状态下文件的读写(转)
- office2007中如何从任意一页显示页码以及如何从第二页显示页码
- c#如何使用socket发送一条记录再接收一条记录,服务器端及客户端如何编写,初学。。最好有代码,谢谢!
- 激励程序员的9句名言
- Qt程序 与 CMD窗口弹出的控制
- 在MFC类中各种类的指针的获取和应用
- idhttp + TImage 获取网页验证码
- 什么是中间层,什么是三层网络结构