finding geological area with IP

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
hame22
Forum Contributor
Posts: 214
Joined: Wed May 11, 2005 5:50 am

finding geological area with IP

Post by hame22 »

Hi all

you would be helping me out greatly if you canhelp me achieve this!

I have a page which displays prices of my service. This service price is displayed in pounds, however what i want to achieve is if the user is from say india display the price in indian rupees.

What i want to do is cathc the users IP and based on its location display the price options

i.e. if the users IP is from US display price in dollars, much like the way I get rediretced to google.co.uk even though I type google.com

is this possible and how do i do this (sorry but this is new to me!)

thanks in advance
User avatar
shiznatix
DevNet Master
Posts: 2745
Joined: Tue Dec 28, 2004 5:57 pm
Location: Tallinn, Estonia
Contact:

Post by shiznatix »

viewtopic.php?t=36255

there was quite a discussion about this in that thread. but to rely on a IP address is not smart as it can be spoofed in many ways...but I guess if its just to display the currency then its really not that big of a deal as long as they can change the currency manually if needed eh?
timvw
DevNet Master
Posts: 4897
Joined: Mon Jan 19, 2004 11:11 pm
Location: Leuven, Belgium

Post by timvw »

Btw, that demo has moved to http://timvw.madoka.be/demo/ip2location.php.. But these days virtually everyone is doing the same with google maps... http://timvw.madoka.be/demo/gmap.php
hame22
Forum Contributor
Posts: 214
Joined: Wed May 11, 2005 5:50 am

Post by hame22 »

that looks good,

where does the database, code come from??

i just want to return the country name in text

thanks
timvw
DevNet Master
Posts: 4897
Joined: Mon Jan 19, 2004 11:11 pm
Location: Leuven, Belgium

Post by timvw »

You can get a free country database at http://www.maxmind.com...
Post Reply