mirror of
https://github.com/librespeed/speedtest.git
synced 2024-05-10 18:54:52 +00:00
Merge branch 'master' into docker
This commit is contained in:
@@ -1,4 +1,12 @@
|
||||
<?php
|
||||
header('Content-Type: text/plain; charset=utf-8');
|
||||
echo $_SERVER['REMOTE_ADDR'];
|
||||
header('Content-Type: text/plain; charset=utf-8');
|
||||
if (!empty($_SERVER['HTTP_CLIENT_IP'])) {
|
||||
echo $_SERVER['HTTP_CLIENT_IP'];
|
||||
} elseif (!empty($_SERVER['X-Real-IP'])) {
|
||||
echo $_SERVER['X-Real-IP'];
|
||||
} elseif (!empty($_SERVER['HTTP_X_FORWARDED_FOR'])) {
|
||||
echo $_SERVER['HTTP_X_FORWARDED_FOR'];
|
||||
} else {
|
||||
echo $_SERVER['REMOTE_ADDR'];
|
||||
}
|
||||
?>
|
||||
|
||||
Reference in New Issue
Block a user