-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathabout.php
41 lines (40 loc) · 1.52 KB
/
about.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
<!DOCTYPE html>
<html><meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>What's my IP dude!</title>
<body>
<div id="tools" class="tools">
<p>Your IP:</p>
</div>
<div id="ip-lookup" class="tools">
<?php if ($_SERVER["HTTP_X_FORWARDED_FOR"] != "") {
$IP = $_SERVER["HTTP_X_FORWARDED_FOR"];
$proxy = $_SERVER["REMOTE_ADDR"];
$host = @gethostbyaddr($_SERVER["HTTP_X_FORWARDED_FOR"]);
} else {
$IP = $_SERVER["REMOTE_ADDR"];
$host = @gethostbyaddr($_SERVER["REMOTE_ADDR"]);
} ?>
<h1><?php echo $IP; ?></h1>
</div>
<div id="more" class="tools">
<p><a id="more-link" title="More information" href="javascript:toggle();">More info</a></p>
</div>
<div id="more-info" class="tools">
<ul>
<?php
echo '<li><strong>Remote Port:</strong> <span>'.$_SERVER["REMOTE_PORT"].'</span></li>';
echo '<li><strong>Request Method:</strong> <span>'.$_SERVER["REQUEST_METHOD"].'</span></li>';
echo '<li><strong>Server Protocol:</strong> <span>'.$_SERVER["SERVER_PROTOCOL"].'</span></li>';
echo '<li><strong>Server Host:</strong> <span>'.$host.'</span></li>';
echo '<li><strong>User Agent:</strong> <span>'.$_SERVER["HTTP_USER_AGENT"].'</span></li>';
if ($proxy) echo '<li><strong>Proxy: <span>'.($proxy) ? $proxy : ''.'</span></li>';
$time_start = microtime(true);
usleep(100);
$time_end = microtime(true);
$time = $time_end - $time_start;
?>
</ul>
<p><small>It took <?php echo $time; ?> seconds to share this info.</small></p>
</div>
</body>
</html>