Files
ipecho/legacy/i.z.gd-index.php
zzgandClaude Opus 5.5 506bc20652 ipecho: Go replacement for i.z.gd/i.zk.gd PHP pages
Serves the same fields and formats as the old PHP scripts, with
HTML/XML/CSV output escaped, X-Real-IP trusted only from loopback,
and a 2s reverse-DNS timeout. m.z.gd becomes an nginx return.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-21 09:05:06 -07:00

28 lines
599 B
PHP

<?php
$data = array (
'ip' => $_SERVER['REMOTE_ADDR'],
'hostname' => gethostbyaddr($_SERVER['REMOTE_ADDR']),
'user-agent' => (isset($_SERVER['HTTP_USER_AGENT']) ? $_SERVER['HTTP_USER_AGENT'] : ''),
'timestamp' => time()
);
if (isset($_GET['nice'])) {
?><!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<style>
body {
font-family: 'Courier New', monospace;
}
</style>
</head>
<body><?php
echo implode("<br><br>",$data);
?></body>
</html><?php
} else {
echo implode("\n",$data);
}
?>