Page 1 of 1

I.P geographic location script

Posted: Tue Jun 27, 2006 5:23 am
by hame22
Hi not sure if this is the right forum to post this question but it is php related.

I have a php script that uses a users IP address to determine whether they come from UK, USA or other country

The problem that I am having is that some users in the uK are being seen as coming from the USA.

What is the reason behind this and can this be solved??

I have heared some uk users maybe using US ISP's, could this be the case?

thanks in advance

Posted: Tue Jun 27, 2006 9:57 am
by hawleyjr
There are a ton of reasons why this could be :) As a matter of practice. DO NOT relay on IP addresses... :)

Posted: Tue Jun 27, 2006 10:08 am
by Luke
IP addresses don't always have ANY geographic correlation to their user.

Posted: Tue Jun 27, 2006 10:11 am
by RobertGonzalez
Some ISP's shuffle IP during sessions. Some proxy servers do the same thing. IP are not a very reliable means of determining geographic positioning.

Posted: Tue Jun 27, 2006 12:14 pm
by bokehman
The most likely reason is that their host is America OnLine

Posted: Wed Jun 28, 2006 3:12 am
by hame22
Ok that is exactly what I though.

Are there any alternative methods which I could use to do the same thing as using the I.p.s?

thanks in advance

Posted: Wed Jun 28, 2006 3:55 am
by Ambush Commander
Nope.

What you can do however is ask the user to supply their geographic location.

Posted: Wed Jun 28, 2006 12:38 pm
by Benjamin
Ask them?

Posted: Wed Jun 28, 2006 12:51 pm
by Luke
astions wrote:Ask them?

Code: Select all

<form method="post" action="location.php">
What is your location?
<input type="text" name="location" />
</form>

Posted: Wed Jun 28, 2006 1:32 pm
by RobertGonzalez

Code: Select all

<form method="post" action="location.php"> 
What is your location? And remember, this is for posterity's sake, so please be honest.
<input type="text" name="location" /> 
</form>