note 123583 added to function.geoip-country-code-by-name

From: Date: Tue, 05 Feb 2019 19:22:20 +0000
Subject: note 123583 added to function.geoip-country-code-by-name
Groups: php.notes 
Request: Send a blank email to php-notes+get-210192@lists.php.net to get a copy of this message
The doc example gets the country of the website. However, to get the country of your website's "visitor/user", use the "user's" IP address as parameter: <?php $country = geoip_country_code_by_name($_SERVER['REMOTE_ADDR']); ?> ---- Server IP: 208.43.231.9 Probable Submitter: 82.199.157.35 (proxied: 150.148.14.130) ---- Manual Page -- http://php.net/manual/en/function.geoip-country-code-by-name.php Edit -- https://master.php.net/note/edit/123583 Del: integrated -- https://master.php.net/note/delete/123583/integrated Del: useless -- https://master.php.net/note/delete/123583/useless Del: bad code -- https://master.php.net/note/delete/123583/bad+code Del: spam -- https://master.php.net/note/delete/123583/spam Del: non-english -- https://master.php.net/note/delete/123583/non-english Del: in docs -- https://master.php.net/note/delete/123583/in+docs Del: other reasons-- https://master.php.net/note/delete/123583 Reject -- https://master.php.net/note/reject/123583 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#210192) next »