Mercurial > hg > ywww
view geoiptest.php @ 43:dbc006408d2b
ASSUMES we have SetEnv PHP_VALUE "include_path =.:/var/test/private:/var/test/ywww:/usr/share/php" in apache2/.../test.conf
use dl(...) for debug logging, defined in dlog.php
use doAmazonRequest in amazonBookSearch
use ../private/web.php (q.v., not in mercurial) for Aserver and Aassociates
Started by updating from 40:c24ae74bf6d5, i.e. just before the bug on the main line
author | Charlie Root |
---|---|
date | Sat, 05 Jan 2019 18:00:10 -0500 |
parents | 1bb0bc3d306a |
children |
line wrap: on
line source
<html> <body> <?php if (isset($_SERVER["GEOIP_COUNTRY_NAME"])) { $country_name = $_SERVER["GEOIP_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>