
Bibliothèque de géolocalisation IP.
Implémenté dans le langage Delphi, il utilise le concept d'interface fluide pour guider l'utilisation de la bibliothèque.
Bibliothèque développée à l'aide des principaux acteurs du marché de la solution "IP-goolocation", attaché à la liste des fournisseurs approuvés.
La géolocalisation basée sur l'adresse IP est une technique utilisée pour estimer l'emplacement géographique d'un appareil connecté à Internet à l'aide de son adresse IP. Ce mécanisme dépend que l'adresse IP de l'appareil apparaît dans une base de données avec son emplacement respectif, son adresse postale, sa ville, son pays, sa région ou ses coordonnées géographiques, qui sont quelques-uns des niveaux de détail qui peuvent être enregistrés.
Pour plus d'informations: Géolocation IPS
Cette technologie est largement utilisée dans:
Géo-marketing
Direction du contenu
Contrôle d'accès (contenu / services)
Sécurité
| Fournisseur | Site web | API | Demandes gratuites |
|---|---|---|---|
| IP2Location | https://www.ip2location.com | https://api.ip2location.com/v2 | 10 000 parois |
| Ipgeolocation | https://ipgeolocation.io | https://api.ipgeolocation.io/ipgeo | 1 500 par jour |
| Ipstack | https://ipstack.com | http://api.ipstack.com | 10 000 mois |
| Ipify | https://geo.ipify.org | https://geo.ipify.org/api/v1 | 1 000 mois |
| Ipapi | https://ipapi.com | http://api.ipapi.com/api | 10 000 parois |
| Ipinfo | https://ipinfo.io | https://ipinfo.io | 50 000 mensuels |
| Ipgeolocationapi | https://ipgeolocationapi.com | https://api.ipgeolocationapi.com/geolocate | Illimité |
| Ipwhois | https://ipwhois.io | http://ipwhois.app | 10 000 mois |
| Ipdig | https://ipdig.io | https://ipdig.io | Illimité |
| Ipdata | https://ipdata.co | https://api.ipdata.co | 1 500 par jour |
| Iplabstack | https://labstack.com/ip | https://ip.labstack.com/api/v1 | 10 000 mois |
| Iptwist | https://iptwist.com | https://iptwist.com | 1 000 mois |
| IP-API | https://ip-api.com | http://ip-api.com | Illimité |
| Db-ip | https://db-ip.com | http://api.db-ip.com/v2 | Illimité |
En utilisant le boss (Dependency Anager pour Delphi), vous pouvez installer automatiquement la bibliothèque.
boss install github.com/antoniojmsjr/IPGeoLocation
Projet> Options> Compiler Delphi> Target> Toutes les configations> Chemin de recherche
..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 est gratuit et un logiciel open source sous licence sous le