Get location of User

How to get geolocation of a user i.e the "city" name for user and show to him ?

I found a java script HTML5 version but that is not accurate …

The most accurate way, is maxmind’s geoip service:

but this requires too much work, however, a simpler solution is