IPGeoLocation
v1.5.3

IP Geolocation Library。
Delphi Languageで実装され、流fluentインターフェイスの概念を使用して、ライブラリの使用を導きます。
ライブラリは、承認されたプロバイダーのリストに添付された「IP-Goolocation」ソリューション市場の主要なプレーヤーを使用して開発されました。
IPアドレスベースのジオロケーションは、IPアドレスを使用してインターネットに接続されているデバイスの地理的位置を推定するために使用される手法です。このメカニズムは、デバイスのIPアドレスが、それぞれの場所、郵便アドレス、都市、国、地域、または地理的座標を持つデータベースに表示されることに依存します。これらは記録できる詳細レベルの一部です。
詳細については、IPS Geolocation
このテクノロジーは、以下で広く使用されています。
GEOマーケティング
コンテンツの方向
アクセス制御(コンテンツ/サービス)
安全
| プロバイダー | Webサイト | API | 無料リクエスト |
|---|---|---|---|
| IP2Location | https://www.ip2location.com | https://api.ip2location.com/v2 | 10、000年 |
| ipgeolocation | https://ipgeolocation.io | https://api.ipgeolocation.io/ipgeo | 毎日1,500 |
| ipstack | https://ipstack.com | http://api.ipstack.com | 毎月10,000 |
| ipify | https://geo.ipify.org | https://geo.ipify.org/api/v1 | 毎月1,000 |
| IPAPI | https://ipapi.com | http://api.ipapi.com/api | 10、000年 |
| IPINFO | https://ipinfo.io | https://ipinfo.io | 毎月50,000 |
| Ipgeolocationapi | https://ipgeolocationapi.com | https://api.ipgeolocationapi.com/geolocate | 無制限 |
| IPWHOIS | https://ipwhois.io | http://ipwhois.app | 毎月10,000 |
| IPDIG | https://ipdig.io | https://ipdig.io | 無制限 |
| IPDATA | https://ipdata.co | https://api.ipdata.co | 毎日1,500 |
| iplabstack | https://labstack.com/ip | https://ip.labstack.com/api/v1 | 毎月10,000 |
| iptwist | https://iptwist.com | https://iptwist.com | 毎月1,000 |
| IP-API | https://ip-api.com | http://ip-api.com | 無制限 |
| DB-IP | https://db-ip.com | http://api.db-ip.com/v2 | 無制限 |
Boss (Delphiの依存関係者)を使用すると、ライブラリを自動的にインストールできます。
boss install github.com/antoniojmsjr/IPGeoLocation
プロジェクト>オプション> Delphiコンパイラ>ターゲット>すべての設定>検索パス
..IPGeoLocationSource
uses IPGeoLocation, IPGeoLocation.Interfaces, IPGeoLocation.Types; var
lMsgError: string;
lGeoLocation: IGeoLocation;
begin
try
lGeoLocation := TIPGeoLocation.New
.IP[ ' 201.86.220.241 ' ]
.Provider[TIPGeoLocationProviderKind.IPInfo]
// .SetTimeout(5000) //[OPCIONAL]
// .SetAPIKey('TOKEN') //[OPCIONAL]: VERIFICAR ARQUIVO: APIKey.inc
.Request
// .SetResultLanguageCode('pt-br') //[OPCIONAL]
.Execute;
Application.MessageBox(PWideChar(lGeoLocation.ToJSON), ' JSON ' , MB_OK + MB_ICONINFORMATION); // JSON COM O RESULTADO DA GEOLOCALIZAÇÃO
except
on E: EIPGeoLocationRequestException do
begin
lMsgError := Concat(lMsgError, Format( ' IP: %s ' , [E.IP]), sLineBreak);
lMsgError := Concat(lMsgError, Format( ' IPVersion: %s ' , [E.IPVersion]), sLineBreak);
lMsgError := Concat(lMsgError, Format( ' Provider: %s ' , [E.Provider]), sLineBreak);
lMsgError := Concat(lMsgError, Format( ' DateTime: %s ' , [DateTimeTostr(E.DateTime)]), sLineBreak);
lMsgError := Concat(lMsgError, Format( ' Kind: %s ' , [E.Kind.AsString]), sLineBreak);
lMsgError := Concat(lMsgError, Format( ' URL: %s ' , [E.URL]), sLineBreak);
lMsgError := Concat(lMsgError, Format( ' Method: %s ' , [E.Method]), sLineBreak);
lMsgError := Concat(lMsgError, Format( ' Status Code: %d ' , [E.StatusCode]), sLineBreak);
lMsgError := Concat(lMsgError, Format( ' Status Text: %s ' , [E.StatusText]), sLineBreak);
lMsgError := Concat(lMsgError, Format( ' Message: %s ' , [E.Message]));
Application.MessageBox(PWideChar(lMsgError), ' A T E N Ç Ã O ' , MB_OK + MB_ICONERROR);
end ;
on E: Exception do
begin
Application.MessageBox(PWideChar(E.Message), ' A T E N Ç Ã O ' , MB_OK + MB_ICONERROR);
end ;
end ;
end ;

IPGeoLocationは無料でオープンソースのソフトウェアがライセンスされています