18.10.2015, 12:09
GeoIP - lite version
Yesterday i found an API witch provide you to get geoip stats for an IP.
The script is simple and small. Just an HTTP request to https://freegeoip.net.
Here are the available functions:
I recommend to use this include for better time execution and stability: https://sampforum.blast.hk/showthread.php?tid=296171.
This is a "lite" version and it can have problems with the API or others factors.
Here are the download links:
https://github.com/Catalin-Mihai/Geo...leases/tag/1.0 // Github
http://pastebin.com/uQ7gZgpT // Pastebin
Enjoy! Please post your feedback below.
P.S: This is my first include.
Credits:
- https://freegeoip.net for the API
- ****** for Encoding function.
Yesterday i found an API witch provide you to get geoip stats for an IP.
The script is simple and small. Just an HTTP request to https://freegeoip.net.
Here are the available functions:
Код:
- Geo_GetIP(playerid); // Get the IP for a player (same as GetPlayerIP) - Geo_GetAllData(playerid); // Get a string of all player data. - Geo_GetCountry(playerid); // Get the player country as a string - Geo_GetCountryCode(playerid); // Get the player country Code as a string (Ex: RO, US, PL, NL) - Geo_GetCity(playerid); // Get the player city as a string - Geo_GetRegionCode(playerid) ; // Get the player region code as a string (Ex: CA, LA, LS) - Geo_GetRegion(playerid); // Get the player region as a string - Geo_GetZipCode(playerid); // Get the player Zip code as a integer - Geo_GetTimeZone(playerid); // Get the player time zone as a string (Ex: Europe/Bucharest) - Geo_GetLatitude(playerid); // Get the player latitude as a float - Geo_GetLongitude(playerid); // Get the player longitude as a float - Geo_GetMetroCode(playerid); // Get the player metro code as a integer
This is a "lite" version and it can have problems with the API or others factors.
Here are the download links:
https://github.com/Catalin-Mihai/Geo...leases/tag/1.0 // Github
http://pastebin.com/uQ7gZgpT // Pastebin
Enjoy! Please post your feedback below.
P.S: This is my first include.
Credits:
- https://freegeoip.net for the API
- ****** for Encoding function.