Initial commit.
This commit is contained in:
parent
a9c913c9a7
commit
317e1b4e10
13 changed files with 260 additions and 0 deletions
18
ifconfig/ifconfig.php
Normal file
18
ifconfig/ifconfig.php
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
---
|
||||
permalink: /cgi/ifconfig/
|
||||
---
|
||||
|
||||
<?php
|
||||
if (!empty($_SERVER['HTTP_CLIENT_IP'])) {
|
||||
//ip from share internet
|
||||
$ip = $_SERVER['HTTP_CLIENT_IP'];
|
||||
} elseif (!empty($_SERVER['HTTP_X_FORWARDED_FOR'])) {
|
||||
//ip pass from proxy
|
||||
$ip = $_SERVER['HTTP_X_FORWARDED_FOR'];
|
||||
} else {
|
||||
$ip = $_SERVER['REMOTE_ADDR'];
|
||||
}
|
||||
|
||||
header('Content-Type: text/plain');
|
||||
echo($ip);
|
||||
?>
|
||||
Loading…
Add table
Add a link
Reference in a new issue