You can use Google's geocoding API to get a real address for a location but the inputs required for that API are the latitude and longitude coordinates.
Example:
http://maps.googleapis.com/maps/api/geocode/json?latlng=43.473,-82.533&sensor=false
You need to find and IP to Location API from some other vendor to get to a city level or keep the option to prompt them to grant you access for their geolocation.
IPInfoDB does a pretty good job at automatically narrowing down the location via IP without use input:
http://ipinfodb.com/ip_location_api.php