[Include] IP Lookup Script
#1

Hi,

Emmet was the original designer of the code (Original Thread: https://sampforum.blast.hk/showthread.php?tid=521843). I picked this up off the forums a while ago after I got tired of updating GeoIP databases. Unfortunately, the code I found from Emmet's post no longer worked as the search API no longer worked. So I found a new API that did work, reworked the code around to get it to work with the new API, and added support for viewing the ISP of an IP Address.

Functions:
Code:
GetPlayerCountry(playerid, country[], size = sizeof(country));
GetPlayerRegion(playerid, region[], size = sizeof(region));
GetPlayerCity(playerid, city[], size = sizeof(city));
GetPlayerISP(playerid, isp[], size = sizeof(isp));
GetPlayerTimezone(playerid, timezone[], size = sizeof(timezone));
GetPlayerZipcode(playerid, zipcode[], size = sizeof(zipcode));
Callback:
Code:
public OnLookupComplete(playerid){

    return 1;
}
Using things like this saves a lot of time by not having to ALT + Tab to ****** an IP Address to find the information.

API used is http://ip-api.com.

Note if you do over 150 queries within 1 minute, you'll get your server's IP banned for flooding.

Complete documentation for the API is here.

Link:
http://pastebin.com/h7MYhriH
Reply


Messages In This Thread
IP Lookup Script - by Banana_Ghost - 17.05.2016, 10:19
Re: IP Lookup Script - by JustMe.77 - 17.05.2016, 18:28
Re: IP Lookup Script - by Banana_Ghost - 18.05.2016, 08:50
Re: IP Lookup Script - by Miller007 - 18.05.2016, 08:55
Re: IP Lookup Script - by Zorono - 18.05.2016, 10:10
Re: IP Lookup Script - by justice96 - 18.05.2016, 10:15
Re: IP Lookup Script - by Banana_Ghost - 18.05.2016, 12:34
Respuesta: IP Lookup Script - by dannypanda05 - 18.05.2016, 13:09
Re: IP Lookup Script - by HydraHumza - 18.05.2016, 13:40
Re: IP Lookup Script - by Private200 - 18.05.2016, 16:00
Re: IP Lookup Script - by N0FeaR - 18.05.2016, 19:27
Re: IP Lookup Script - by muhsah007 - 02.06.2016, 20:49
Re: IP Lookup Script - by zSuYaNw - 02.06.2016, 21:04
Re: IP Lookup Script - by vannesenn - 02.06.2016, 22:19
Re: IP Lookup Script - by PT - 04.06.2016, 12:05
Re: IP Lookup Script - by muhsah007 - 04.06.2016, 18:13
Re: IP Lookup Script - by Banana_Ghost - 05.06.2016, 09:51
Re: IP Lookup Script - by Banana_Ghost - 05.06.2016, 09:55
Re: IP Lookup Script - by iLearner - 27.11.2016, 20:32
Re: IP Lookup Script - by GoldenMan - 29.08.2017, 13:25

Forum Jump:


Users browsing this thread: 1 Guest(s)