Version: 1.0.2, by The M.I.P.
Developer Last Online: Nov 2023
Version: 3.5.x
Rating:
Released: 02-02-2006
Last Update: 02-02-2006
Installs: 19
Uses Plugins
Additional Files
No support by the author.
This plugin uses Maxmind's GeoIP database to look up a visitor's country depending on his IP-address.
You may use this e.g. to display specific content or advertisements depending on the geographical location of your visitors.
Installation:
Download geoip.inc PHP module and save it in your forum's includes/ directory.
Download the latest GeoLite Country DatabaseGeoIP.dat.gz, uncompress it (gunzip or evil ones like WinRAR) and save the uncompressed file under includes/GeoIP.dat (you can change the location of this file in your vBulletin Options).
You should update this file once in a while.
Make sure to have plugin system enabled.
Install product mip-geoiptracker-1.0.xml
Usage:
Use $bbuserinfo[country] (or $vbulletin->userinfo[country]) in your code, your templates, etc.
Have a look on the plugin sources and on GeoIP PHP API if you're interested in getting infos other than the country code.
Changes:
1.0.1 --> 1.0.2
Fixed bug with geoipdatfile setting not being included in product.
1.0 --> 1.0.1
Basic caching is done using cookies.
This plugin is likely to work also with commercial versions of Maxmind GeoIP databases, which would - with minor tweaks - allow resolving a user's location down to region and even city levels.
On high-traffic sites, I recommend using GeoIP PHP extension or Apache module instead of this plain PHP code.
Please note that I don't give free support for this plugin, as the vBulletin part is too simple and the rest is code from Maxmind.
Show Your Support
This modification may not be copied, reproduced or published elsewhere without author's permission.
Nevermind, it's based on DNS resolver... And DNS queries may cause page load delays, although not necessarily server load.
Bleh. Not interesting.
No, this is wrong.
This program is based on IP address which comes "without network load cost" from the HTTP $_SERVER['REMOTE_ADDR'] global PHP var.
Basically, the server simply takes the REMOTE_ADDR (IP address) and queries a file on the same server (can download file for free) and returns country information.
This is a great feature for many forums that would like to display different content to the user based on country.
Sorry if this is a dumb question, but does this mod also allow me to geolocate forums. Therefore only showing certain forums to certain users based on their geographic location?
Thanks,
Tom
Yes, it does. Basically, with a bit of writing code, you can do "just about anything" based on Country (or even City).
For many users, it might be easier just to install this PHP extension (since this mod is not supported anymore):
Ah, we found it was easier to install Apache2 mod_geoip. A plugin for this is not really necessary, FYI. So, I recommend mod_geoip for this because it is easy to install and runs great.