The geographic location must be made in the browser, as the server (i.e. PHP) will never know most of the relevant data. The main API for performing geolocation in a browser is Google, but you, as a developer, will not need to use this API; you should use a browser API that is standardized (although it is only supported in a few browsers).
, , IP-, , . IP-to-nation IP-to-location API, , . , , . , , , IP .
API- , Wi-Fi. Google, Lat/Long ( ).
? , , , Google Wi-Fis? , , Wi-Fi .
, , Wi-Fi.
, (, Javascript DOM), PHP, ; .