initial commit

This commit is contained in:
2026-03-30 11:51:52 +02:00
commit 7ff76896e6
22 changed files with 1126 additions and 0 deletions

24
index.php Normal file
View File

@@ -0,0 +1,24 @@
<?php
include $_SERVER['DOCUMENT_ROOT'] . "/include/all.php";
$ip = defined('CURRENT_IP') ? CURRENT_IP : ($_SERVER['REMOTE_ADDR'] ?? '');
$s = $ip; // fallback par défaut = lIP brute
if ($ip && filter_var($ip, FILTER_VALIDATE_IP)) {
try {
$h = @gethostbyaddr($ip); // @ pour éviter le warning DNS
if ($h && $h !== $ip) {
$s = explode('.', $h)[0]; // court hostname
}
} catch (ValueError $e) {
// IP invalide → on garde $s = $ip
}
} elseif (!$ip) {
$s = 'UNKNOWN_IP';
}
$u = CURRENT_USER ?? "Anonymous";
echo "Hello $u <br>";
echo "Having fun navigating from $s ? <br>";
echo "Nothing to see in here ;) <br>";
echo "<b>Every action is logged !</b> <br>";
?>