Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Show players home country
Author Message
Kanibal
Master
**

Posts: 255
Likes Given: 6
Likes Received: 30 in 28 posts
Joined: Jun 2012
Reputation: 0



Post: #8
RE: Show players home country
MySQL + GeoIP
Code:
[EVENTS e_char_country_tooltip]
on=@clienttooltip
src.addcliloc <def.empty_cliloc>,Country: <f_get_country <account.lastip>>

[FUNCTION f_get_country]
db.connect
db.query "SELECT * FROM `geoip_ip` WHERE INET_ATON('<argv[0]>') BETWEEN `start` AND `end`"
    if (<db.row.numrows> > 0)
      return <db.row.0.country>
    else
      return "N/A"
    endif
db.close
Country GeoIP database in attachment


Attached File(s)
.rar  geoip_ip.rar (Size: 1.99 MB / Downloads: 13)

Grandmaster Localhost Admin
(This post was last modified: 02-25-2019 07:39 AM by Kanibal.)
02-25-2019 07:03 AM
Visit this user's website Find all posts by this user Like Post Quote this message in a reply
[+] 2 users Like Kanibal's post
Post Reply 


Messages In This Thread
Show players home country - Lano - 02-12-2019, 07:02 AM
RE: Show players home country - Coruja - 02-12-2019, 10:34 AM
RE: Show players home country - Lano - 02-12-2019, 09:57 PM
RE: Show players home country - golfin - 02-13-2019, 03:53 AM
RE: Show players home country - Coruja - 02-14-2019, 09:42 AM
RE: Show players home country - golfin - 02-14-2019, 06:51 PM
RE: Show players home country - Lano - 02-15-2019, 06:06 AM
RE: Show players home country - Kanibal - 02-25-2019 07:03 AM
RE: Show players home country - Kanibal - 11-15-2020, 09:26 AM

Forum Jump:


User(s) browsing this thread: 1 Guest(s)