Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <html>
- <head>
- <title>Your title</title>
- </head>
- <body>
- <div>The current uptime of "hostname/domain here" (IP here) is:</div>
- <?php
- $buh = strtok( exec( "cat /proc/uptime" ), "." );
- $days = sprintf( "%2d", ($buh/(3600*24)) );
- $hours = sprintf( "%2d", ( ($buh % (3600*24)) / 3600) );
- $min = sprintf( "%2d", ($buh % (3600*24) % 3600)/60 );
- $sec = sprintf( "%2d", ($buh % (3600*24) % 3600)%60 );
- echo "$days days, $hours hours, $min minutes, $sec seconds";
- ?>
- <p></p>
- <?php
- $hst = $_SERVER["HTTP_HOST"];
- $uri = $_SERVER["REQUEST_URI"];
- $rmt = $_SERVER["REMOTE_ADDR"];
- $br = $_SERVER["HTTP_USER_AGENT"];
- echo "Your IP address reflects as : $rmt \n<br>\n The page you requested was: $uri \n<br>\n The browser you are using is $br";
- ?>
- <p></p>
- <div>PHP Info: <a href="path to your phpinfo file ">phpinfo</a></div>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment