Today there are lots Free/Paid API avaiable which give you client information.
Following are two example which give you client information like city, country, country code, ip, local date time, timezone etc with javascript.
Question: How to get visitor location javascript with freegeoip.net?
Output
{"ip": "112.196.3.177", "hostname": "No Hostname", "city": "Mohali", "region": "Punjab", "country": "IN", "loc": "30.7800,76.6900", "org": "AS17917 Quadrant Televentures Limited" }