Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Catalog · How the catalog works

Random project

IPInfo_API

ipinfo.io API for Delphi

View on GitHub

Anyone may press Interesting, signed in or not. It helps others find this project.

Member rating

No ratings yet.

Sign in to rate this project.

README

# IPinfo IPinfo Delphi Client Library

pascal
uses 
 HGM.IpInfo;
... 
var
 Details: TDetails;
begin
 with TIpInfo.Create('') do
 try
   if GetDetails(Details, '8.8.8.8') then
   try
     Memo1.Lines.Add(Details.Country);
   finally  
     Details.Free;
   end;
 finally  
   Free;
 end;
end;
pascal
var
 IpInfo: IIpInfo;
 ASN: TASN;
begin
 IpInfo := TIpInfo.Create('', True);
 IpInfo.RaiseErrors := True;
 if IpInfo.GetASN(ASN, 'AS7922') then
 try
   Memo1.Lines.Add(ASN.Domain);
 finally  
   ASN.Free;
 end;
end;
pascal
Memo1.Lines.Add(IpInfo.GetItem('city', '2001:4860:4860::8888'));

Получить токен можно здесь: https://ipinfo.io/account/home