diff geoiptest.php @ 42:3f400072bf14

merge, involved ediff3 wrt getAmazonInfo.php
author Charlie Root
date Sat, 05 Jan 2019 06:21:12 -0500
parents 1bb0bc3d306a
children
line wrap: on
line diff
--- a/geoiptest.php	Sun Jul 30 05:36:48 2017 -0400
+++ b/geoiptest.php	Sat Jan 05 06:21:12 2019 -0500
@@ -1,8 +1,19 @@
 <html>
 <body>
 <?php
+if (isset($_SERVER["GEOIP_COUNTRY_NAME"])) {
 $country_name = $_SERVER["GEOIP_COUNTRY_NAME"];
-print "Country: " . $country_name;
+ }
+ else {
+$country_name = $_SERVER["REDIRECT_GEOIP_COUNTRY_NAME"];
+ }
+if (isset($_SERVER["GEOIP_COUNTRY_CODE"])) {
+$country_code = $_SERVER["GEOIP_COUNTRY_CODE"];
+ }
+ else {
+$country_code = $_SERVER["REDIRECT_GEOIP_COUNTRY_CODE"];
+ }
+print "Country: $country_name , code: $country_code";
 ?>
 </body>
 </html>