https://github.com/hemulgm/ipinfo_api
ipinfo.io API for Delphi
https://github.com/hemulgm/ipinfo_api
api-wrapper delphi ipinfo
Last synced: 3 months ago
JSON representation
ipinfo.io API for Delphi
- Host: GitHub
- URL: https://github.com/hemulgm/ipinfo_api
- Owner: HemulGM
- License: mit
- Created: 2021-04-12T13:23:12.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2023-01-06T09:13:48.000Z (over 2 years ago)
- Last Synced: 2025-01-10T12:37:24.265Z (9 months ago)
- Topics: api-wrapper, delphi, ipinfo
- Language: Pascal
- Homepage:
- Size: 156 KB
- Stars: 11
- Watchers: 3
- Forks: 6
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# [
](https://ipinfo.io/) 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