skaterdav85 Posted November 2, 2010 Share Posted November 2, 2010 Is there a way through superglobals to get the country of the viewer, or do I need to do this through an API? Link to comment Share on other sites More sharing options...
trevelluk Posted November 2, 2010 Share Posted November 2, 2010 You can use PHP's GeoIP functions, in particular the geoip_country_code_by_name() function (which takes a host name or IP address). Bear in mind that not all hosting packages will have these installed by default.Documentation is available at http://uk3.php.net/geoip Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.