I am trying to add the following feature to my application.
Sequence of actions:
User goes to the web application
Web application detects the country and city based on the users IP address
Web application automatically selects users country and city and shows it to the user.
I tried searching for this and even asked a question in the google app engine google group, but i couldn't find a reliable way to get this done in google app engine.
Does anyone have any points where i can get started on this?
I would use the Simplegeo API. There's a very fast call to do just this. https://simplegeo.com/docs/api-endpoints/simplegeo-places
If you need to do this server-side then you will need to get hold of one of the databases that map IP addresses to countries/cities. These databases go out of date requenquently and so are usually commercial. Maxmind have various licences for their database including some free ones I believe.
However, if you could move the check on to the client-side, in the browser you could make an ajax call to Maxmind's free JSONP API to fetch the estimated location of your user, and then let your application handle the decisions using javascript.