Sample: Where Am I (as used on the homepage)
Created using :
JavaScript API for ArcGIS
and
GeoIP