Mercurial > hg > ywww
annotate geoiptest.php @ 49:a67bf725e87b
put both paths in include_path and depend on that
author | Charlie Root |
---|---|
date | Wed, 16 Jan 2019 13:42:15 -0500 |
parents | 1bb0bc3d306a |
children |
rev | line source |
---|---|
6
077b0a0a3e6d
remaining originals according to dependency walk
Robert Boland <robert@markup.co.uk>
parents:
diff
changeset
|
1 <html> |
077b0a0a3e6d
remaining originals according to dependency walk
Robert Boland <robert@markup.co.uk>
parents:
diff
changeset
|
2 <body> |
077b0a0a3e6d
remaining originals according to dependency walk
Robert Boland <robert@markup.co.uk>
parents:
diff
changeset
|
3 <?php |
27
1bb0bc3d306a
update where to look for geoip info
Robert Boland <robert@markup.co.uk>
parents:
20
diff
changeset
|
4 if (isset($_SERVER["GEOIP_COUNTRY_NAME"])) { |
16
093e42d5a874
minor tidy-ups on new-server install
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
6
diff
changeset
|
5 $country_name = $_SERVER["GEOIP_COUNTRY_NAME"]; |
27
1bb0bc3d306a
update where to look for geoip info
Robert Boland <robert@markup.co.uk>
parents:
20
diff
changeset
|
6 } |
1bb0bc3d306a
update where to look for geoip info
Robert Boland <robert@markup.co.uk>
parents:
20
diff
changeset
|
7 else { |
1bb0bc3d306a
update where to look for geoip info
Robert Boland <robert@markup.co.uk>
parents:
20
diff
changeset
|
8 $country_name = $_SERVER["REDIRECT_GEOIP_COUNTRY_NAME"]; |
1bb0bc3d306a
update where to look for geoip info
Robert Boland <robert@markup.co.uk>
parents:
20
diff
changeset
|
9 } |
1bb0bc3d306a
update where to look for geoip info
Robert Boland <robert@markup.co.uk>
parents:
20
diff
changeset
|
10 if (isset($_SERVER["GEOIP_COUNTRY_CODE"])) { |
20 | 11 $country_code = $_SERVER["GEOIP_COUNTRY_CODE"]; |
27
1bb0bc3d306a
update where to look for geoip info
Robert Boland <robert@markup.co.uk>
parents:
20
diff
changeset
|
12 } |
1bb0bc3d306a
update where to look for geoip info
Robert Boland <robert@markup.co.uk>
parents:
20
diff
changeset
|
13 else { |
1bb0bc3d306a
update where to look for geoip info
Robert Boland <robert@markup.co.uk>
parents:
20
diff
changeset
|
14 $country_code = $_SERVER["REDIRECT_GEOIP_COUNTRY_CODE"]; |
1bb0bc3d306a
update where to look for geoip info
Robert Boland <robert@markup.co.uk>
parents:
20
diff
changeset
|
15 } |
20 | 16 print "Country: $country_name , code: $country_code"; |
6
077b0a0a3e6d
remaining originals according to dependency walk
Robert Boland <robert@markup.co.uk>
parents:
diff
changeset
|
17 ?> |
077b0a0a3e6d
remaining originals according to dependency walk
Robert Boland <robert@markup.co.uk>
parents:
diff
changeset
|
18 </body> |
077b0a0a3e6d
remaining originals according to dependency walk
Robert Boland <robert@markup.co.uk>
parents:
diff
changeset
|
19 </html> |