aboutsummaryrefslogtreecommitdiffstats
path: root/en/downloads
diff options
context:
space:
mode:
authorRomain d'Alverny <rda@mageia.org>2012-02-21 19:02:02 +0000
committerRomain d'Alverny <rda@mageia.org>2012-02-21 19:02:02 +0000
commit76418df88410e358da939faf08f3764fa4e7b887 (patch)
tree9c43ae988e4574e540f22def0153f2683402b0cd /en/downloads
parentc5b6c37c7f09116ef1784a04144c7f46f21f0ccf (diff)
downloadwww-76418df88410e358da939faf08f3764fa4e7b887.tar
www-76418df88410e358da939faf08f3764fa4e7b887.tar.gz
www-76418df88410e358da939faf08f3764fa4e7b887.tar.bz2
www-76418df88410e358da939faf08f3764fa4e7b887.tar.xz
www-76418df88410e358da939faf08f3764fa4e7b887.zip
testing functions availability
Diffstat (limited to 'en/downloads')
-rw-r--r--en/downloads/debug/index.php16
1 files changed, 14 insertions, 2 deletions
diff --git a/en/downloads/debug/index.php b/en/downloads/debug/index.php
index e5add963b..c93ddfaeb 100644
--- a/en/downloads/debug/index.php
+++ b/en/downloads/debug/index.php
@@ -1,6 +1,10 @@
<?php
$ips = array();
+$functions = array(
+ 'geoip_country_code_by_name',
+ 'geoip_continent_code_by_name'
+);
if (isset($_SERVER['HTTP_X_FORWARDED_FOR'])
&& $str = $_SERVER['HTTP_X_FORWARDED_FOR'])
@@ -12,9 +16,17 @@ if (isset($_SERVER['HTTP_X_FORWARDED_FOR'])
else
$ips['ip'] = $_SERVER['REMOTE_ADDR'];
-echo '<html><body><pre>Testing IP, country, continent',
- "\n------------------------------\n\n";
+echo '<html><body>';
+echo '<h3>Testing functions:</h3>';
+echo '<ul>';
+foreach ($functions as $f) {
+ echo sprintf('<li>%s: %s available</li>',
+ $f, function_exists($f) ? 'is' : 'is not');
+}
+echo '</ul>';
+
+echo '<h3>Testing IP, country, continent</h3>';
foreach ($ips as $label => $ip) {
echo ' * ', $label, ': ', $ip, ' => ';
echo geoip_country_code_by_name($ip), ', ';