
Perpustakaan geolokasi IP.
Diimplementasikan dalam bahasa Delphi, ia menggunakan konsep antarmuka yang lancar untuk memandu penggunaan perpustakaan.
Perpustakaan yang dikembangkan menggunakan pemain utama pasar solusi "IP-goolocation", terlampir pada daftar penyedia yang disetujui.
Alamat IP -Geolokasi Berbasis adalah teknik yang digunakan untuk memperkirakan lokasi geografis perangkat yang terhubung ke Internet menggunakan alamat IP -nya. Mekanisme ini tergantung bahwa alamat IP perangkat muncul dalam database dengan lokasi masing -masing, alamat pos, kota, negara, wilayah atau koordinat geografis, yang merupakan beberapa tingkat detail yang dapat dicatat.
Untuk informasi lebih lanjut: Geolokasi IPS
Teknologi ini banyak digunakan dalam:
Pemasaran Geo
Arah konten
Kontrol Akses (Konten/Layanan)
Keamanan
| Penyedia | Situs web | API | Permintaan gratis |
|---|---|---|---|
| Ip2location | https://www.ip2location.com | https://api.ip2location.com/v2 | 10.000 tahun |
| Ipgeolocation | https://ipgeolocation.io | https://api.ipgeolocation.io/ipgeo | 1.500 setiap hari |
| Ipstack | https://ipstack.com | http://api.ipstack.com | 10.000 bulanan |
| Ipify | https://geo.ipify.org | https://geo.ipify.org/api/v1 | 1.000 bulan |
| Ipapi | https://ipapi.com | http://api.ipapi.com/api | 10.000 tahun |
| Ipinfo | https://ipinfo.io | https://ipinfo.io | 50.000 bulanan |
| Ipgeolocationapi | https://ipgeolocationapi.com | https://api.ipgeolocationapi.com/geolocate | Tak terbatas |
| Ipwhois | https://ipwhois.io | http://ipwhois.app | 10.000 bulanan |
| Ipdig | https://ipdig.io | https://ipdig.io | Tak terbatas |
| Ipdata | https://ipdata.co | https://api.ipdata.co | 1.500 setiap hari |
| IPlabstack | https://labstack.com/ip | https://ip.labstack.com/api/v1 | 10.000 bulanan |
| IPTWIST | https://iptwist.com | https://iptwist.com | 1.000 bulan |
| IP-API | https://ip-api.com | http://ip-api.com | Tak terbatas |
| Db-ip | https://db-ip.com | http://api.db-ip.com/v2 | Tak terbatas |
Menggunakan Boss (Dependency Anager for Delphi) Anda dapat menginstal perpustakaan secara otomatis.
boss install github.com/antoniojmsjr/IPGeoLocation
Proyek> Opsi> Delphi Compiler> Target> Semua Konfigasi> Path Path
..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 gratis dan perangkat lunak open-source yang dilisensikan di bawah