Register Members List Search Today's Posts Mark Forums Read

Reply
 
Mod Options
Geotargeting by GeoIP integration Details »»
Geotargeting by GeoIP integration
Mod Version: 1.0.2, by The M.I.P. (Member) The M.I.P. is offline
Developer Last Online: Jul 2011 I like it Show Printable Version Email this Page

This modification is in the archives.
vB Version: 3.5.x Rating: (0 vote - 0 average) Installs: 18
Released: 03 Feb 2006 Last Update: 03 Feb 2006 Downloads: 124
Not Supported Uses Plugins Additional Files  

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:
  1. Download geoip.inc PHP module and save it in your forum's includes/ directory.
  2. Download the latest GeoLite Country Database GeoIP.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.
  3. Make sure to have plugin system enabled.
  4. 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.

Download Now

Only licensed members can download files, Click Here for more information.

Show Your Support

  • To receive notifications regarding updates -> Click to Mark as Installed.
  • If you like this modification support the author by donating.
  • This modification may not be copied, reproduced or published elsewhere without author's permission.
  #16  
Old 29 Apr 2006, 02:33
akanevsky akanevsky is offline
 
Join Date: Apr 2005
Real name: Anton Kanevsky
What is the basic algorithm used in the inc file to retrieve country info based on ip (I don't feel like reading it through)?

EDIT:

Nevermind, it's based on DNS resolver... And DNS queries may cause page load delays, although not necessarily server load.
Bleh. Not interesting.
__________________
I can no longer support any of my hacks. Please do not contact me for that. Feel free to create and post new versions of my hacks, as long as you give me credit for the original work.

Last edited by akanevsky : 29 Apr 2006 at 02:36.
Reply With Quote
  #17  
Old 14 Mar 2007, 14:15
meera meera is offline
 
Join Date: Nov 2004
Ok someone could help me.

I want only display specific country ads. Can some show example how can this be done..
Reply With Quote
  #18  
Old 30 Mar 2007, 23:13
kafi kafi is offline
 
Join Date: Apr 2004
Great add-on, I was just looking for it.

Does it work on 3.6x? I pray it does :-)
Reply With Quote
  #19  
Old 21 Oct 2007, 16:55
brandondrury brandondrury is offline
 
Join Date: Oct 2005
Great! I've been needing a solution like this.

Would there be any performance gains from simply deciding what country the user is from when they register and just keeping that in the userfield database?

Brandon
__________________
Home Recording Forum

Brandon
Reply With Quote
  #20  
Old 27 Nov 2007, 11:55
Tom Freeman Tom Freeman is offline
 
Join Date: Jan 2005
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
Reply With Quote
  #21  
Old 27 May 2008, 08:36
Thomas P's Avatar
Thomas P Thomas P is offline
 
Join Date: Oct 2001
Is it possible to block certain IPs based on their geolocation using this hack?
__________________
www.MCSEboard.de
MCP / MCSA / MCSE Board
dedicated to Windows 2000 / XP / 2003 Server & Windows Vista.
German Windows Server & Backoffice Community, Microsoft Community Partner (CLIP), MVPs inside.
Reply With Quote
  #22  
Old 29 Aug 2009, 11:16
imported_silkroad imported_silkroad is offline
 
Join Date: Dec 2003
Originally Posted by Psionic Vision View Post
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.
Reply With Quote
  #23  
Old 29 Aug 2009, 11:18
imported_silkroad imported_silkroad is offline
 
Join Date: Dec 2003
Originally Posted by Thomas P View Post
Is it possible to block certain IPs based on their geolocation using this hack?
Yes, you can easily do this, but you need to write the extra code yourself.
Reply With Quote
  #24  
Old 29 Aug 2009, 11:19
imported_silkroad imported_silkroad is offline
 
Join Date: Dec 2003
Originally Posted by Tom Freeman View Post
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):

http://us3.php.net/manual/en/book.geoip.php

Last edited by imported_silkroad : 30 Aug 2009 at 12:05.
Reply With Quote
  #25  
Old 31 Aug 2009, 08:48
imported_silkroad imported_silkroad is offline
 
Join Date: Dec 2003
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.
Reply With Quote
  #26  
Old 08 Sep 2009, 09:00
imported_silkroad imported_silkroad is offline
 
Join Date: Dec 2003
We have integrated GeoIP into vBulletin very easily using mod_geoip.

Details on upgrading mod_geoip here

What we have done so far, is use mod_geoip for geo-targetting.

In addition, we made a simple change to the navbar template to say:

Welcome from Country_Name, User_Name

instead of the standard, Welcome, User_Name

Details on vB navbar feature here.
Reply With Quote
  #27  
Old 17 Aug 2010, 11:36
clubvr4's Avatar
clubvr4 clubvr4 is offline
 
Join Date: Jul 2010
Has anyone ported this to vb4 yet?
Reply With Quote
  #28  
Old 11 Jun 2012, 19:38
Dave234 Dave234 is offline
 
Join Date: Mar 2012
Does this work with vbulletin 4.1.11? Does it work with Amazon Associates?
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
Mod Options

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
Forum Jump


New To Site? Need Help?

All times are GMT. The time now is 01:40.

Layout Options | Width: Wide Color: