
IP Geolocation Library.
In der Delphi -Sprache implementiert, verwendet es das Konzept der fließenden Schnittstelle, um die Verwendung der Bibliothek zu steuern.
Die Bibliothek entwickelt mit den Hauptakteuren des Lösungsmarktes "IP-Golocation", das der Liste der zugelassenen Anbieter beigefügt ist.
IP -Adresse -Basierte Geolokalisierung ist eine Technik, mit der der geografische Standort eines mit dem Internet verbundenen Geräts mit seiner IP -Adresse geschätzt wird. Dieser Mechanismus hängt davon ab, dass die IP -Adresse des Geräts in einer Datenbank mit ihrem jeweiligen Standort, Postadresse, Stadt, Land, Region oder geografischen Koordinaten angezeigt wird.
Für weitere Informationen: IPS -Geolokalisierung
Diese Technologie wird häufig verwendet in:
Geo -Marketing
Inhaltsrichtung
Zugriffskontrolle (Inhalt/Dienste)
Sicherheit
| Anbieter | Webseite | API | Kostenlose Anfragen |
|---|---|---|---|
| IP2Location | https://www.ip2location.com | https://api.ip2location.com/v2 | 10.000 Jahr |
| Ipgeolocation | https://ipgeolocation.io | https://api.ipgeolocation.io/ipgeo | 1.500 täglich |
| Ipstack | https://ipstack.com | http://api.ipstack.com | 10.000 monatlich |
| Ipify | https://geo.ipify.org | https://geo.ipify.org/api/v1 | 1.000 monatlich |
| Ipapi | https://ipapi.com | http://api.ipapi.com/api | 10.000 Jahr |
| Ipinfo | https://ipinfo.io | https://ipinfo.io | 50.000 monatlich |
| Ipgeolocationapi | https://ipgeolocationapi.com | https://api.ipgeolocationapi.com/geolocate | Unbegrenzt |
| Ipwhois | https://iphois.io | http://iphois.app | 10.000 monatlich |
| IPDIG | https://ipdig.io | https://ipdig.io | Unbegrenzt |
| Ipdata | https://ipdata.co | https://api.ipdata.co | 1.500 täglich |
| IPLABSTACK | https://labstack.com/ip | https://ip.labstack.com/api/v1 | 10.000 monatlich |
| Iptwist | https://iptwist.com | https://iptwist.com | 1.000 monatlich |
| IP-API | https://ip-api.com | http://ip-api.com | Unbegrenzt |
| DB-IP | https://db-ip.com | http://api.db-ip.com/v2 | Unbegrenzt |
Verwenden von Boss (Abhängigkeitsanager für Delphi) können Sie die Bibliothek automatisch installieren.
boss install github.com/antoniojmsjr/IPGeoLocation
Projekt> Optionen> Delphi Compiler> Ziel> Alle Konfigurationen> Suchpfad
..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 ist kostenlos und Open-Source-Software lizenziert unter dem