-2

Possible Duplicate:
package for detecting users contry in php?

I have a site, kind of like a dating site where users sign up and list their location, so london or birmingham etc. I want to be able to capture a guests IP and if they are based in london have all the users in london show up as local in their area.

Is this possible? I havn't got the first clue about how this could be done, it's really just to ask and see if it is possible and to see if someone could push me in the right direction please.

Thanks

Community
  • 1
  • 1
  • 1
    Welcome to SO. When you asked this question, you were shown a list of related questions based on what you typed in - always be sure to check that out first. You can look up the list in the "related" column to the bottom right. – Pekka Oct 28 '12 at 16:52
  • 2
    asked and answered FAR TOO MANY TIMES on this site. – Marc B Oct 28 '12 at 16:53

1 Answers1

1

user IP is in $_SERVER superglobal $_SERVER['REMOTE_ADDR']

other part:

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