http://www.cz88.net下载纯真IP地址库文件 qqwry.dat 用来对照IP与物理地址
把qqwry.dat 存放在程序的根目录下。

项目工程文件中导入引用单元文件untQQwry.pas

uses
  Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms,
    untQQWry;

        QQwry : TQQWry; {IP地理位置}

function GetIPtoAdder(IpName: string): string; {从IP地址得到所在地理位置}
var
  ip:string;
begin
  Result:='';
  ip := IpName;
  try
    Result := QQWry.getIPMsg(QQWry.GetIPRecordID(ip))[2]+
      QQwry.getipmsg(QQWry.GetIPRecordID(ip))[3];
  except
    Result := 'IP地址格式不对';
  end;
  if Result = '' then Result := '[未知数据]';
end;
procedure TSocketForm.FormCreate(Sender: TObject);
var
  sIpFile:String;
begin
   {读取IP追捕数据}
  FleshIpList := TStringlist.Create;
  sIpFile := ExtractFilePath(Paramstr(0)) + '\qqwry.dat';
  if not FileExists(sIpFile) then
    sConnHost:='纯真IP数据库不存在'
  else
  QQWry := TQQwry.Create(sIpFile);

end;

调用方式
物理地址:=GetIPtoAdder('要查询的IP');

dmdes.pas

unit dmdes; {*********************************************************} {* DELPHI、PHP、C#通用DES编码解码单元 *} {* 由TurboPower LockBox...

阅读全文

Delphi import unit per OpenSSL DLL RSA+MD5 signature

A nice contribute by Dim (Russia) Require libeay32.pas, v. >= 0.7 // Equivalent to: // openssl dgst -md5 -sign private.pem -hex -out ...

阅读全文

Hash a file with MD5

This tutorial continues from Encrypt a file. Setup Put another button on the main form and caption it "Hash". Add a THash compon...

阅读全文

Comments are closed, but trackbacks and pingbacks are open.