Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

get location of client?

 
pawan chopra
Ranch Hand
Posts: 417
jQuery Mac Objective C
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

I have a requirement where I need to fetch location of the client and according to that I need to display weather information.

Can I do this? If yes then kindly let me know.
 
Rene Larsen
Ranch Hand
Posts: 1179
Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can't do it with 100 % accuracy, because a client can be hosted from a server on the other side of the World.

One way is to use one of the "find my IP address" sites, and then find the right location information in the returned source code - another way is to map the clients IP-adr. to a home made database of each IP-adr. groups for the all Countries/Continents of the World.
 
Abimaran Kugathasan
Ranch Hand
Posts: 2066
Clojure IntelliJ IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
We can't get the actual location of the client with IP address, He/She may be in local address with NAT.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic