Initial commit.

This commit is contained in:
Johannes Findeisen 2024-02-07 09:27:22 +01:00
commit 317e1b4e10
13 changed files with 260 additions and 0 deletions

18
ifconfig/ifconfig.php Normal file
View 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);
?>