Country Flag selection dependiong on ip

remember

New Member
automatic Country Flag selection depending on ip during registration .can any one please tell me how to implement this ?
 

bluescorpion

New Member
remember said:
automatic Country Flag selection depending on ip during registration .can any one please tell me how to implement this ?

Incredible this has been sitting here this long without a response.

You can do this a couple of different ways, at a minimum it will require a plugin (but I think more than one) and a template. The IP lookup is the PITA though it is solvable by doing a query to a public database or adding the IP data to your vb database the current one is about 90000 entries but I know a few hacks on vb.org are using a public lookup on the GEOIP on Maxmind. Any way, you need to do a query on the Member IP address so you can look up to see what Country it belongs to then when you get that just add a wrapper around the results to pick the correct flag image from your image folder and display it in the postbit. Basically that is what you need.

I have had this on my project todo list for a few months now but I think it may already have been done as a hack on vb.org. I see two pitfalls to it, however, the first one is if your member is using a proxy to access your registration page, you will get a bogus Country code from the IP address. The second one is that the member may have some problems about feeling "spied on" when their Country flag, assuming its the right one, shows up in their postbit "magically" ... It gets the same scrutiny from members that the birthday and the IP address itself does so I would be cautious about deploying it as a global site feature? Don't know, just thinking about it...

HTH
 
Top