CruzIT
Monday January 21, 2019 - 15:45:34 PM

Registered Linux User #440901    


 
Login    Register
Login Required

HowTo Display Uptime Information

This method requires a file that will be included seperately in the page to be displayed.
(hint: I usually put some files and html that will be displayed on every page into seperate files like “header.php” and “footer.php”. I add those to a template that is used for every page on the site. This example is one you may want to consider doing the same.)

First: Right click on this link and save it as “upstat.php” to your main directory. The original filename on my server is "upstat.code" If you left click on it, you will see the source code.
Second: For each page this will display, put this line in:

<?php include "upstat.php";  ?>

Third: Wherever you want it displayed, add this line

<?php
$ut = linuxUptimez();
echo "Time since last reboot: $ut[0]$utd, $ut[1]$uth, $ut[2]$utm, $ut[3]$uts";
?>

That should produce something like this:

Time since last reboot: 27 days, 18 hours, 11 minutes, 37 seconds

Collecting For A Server Upgrade  

“Windows - Just Say No”

Time since last reboot: 27 days, 18 hours, 11 minutes, 37 seconds

Page generated in zero point three three (0.33) seconds.

@ Active Member Project Honeypot  email addresses

This page was last modified on 09/1/18 @ 10:33:49:pm
This file name: howto_uptimeinfo.php

Questions, Comments, Suggestions or Requests should be sent to:  ronnie@cruzit.com 

There have been  8026  Unique Visitors (IP Addresses) to this site.

Current users online : 19
Maximum users at a time : 50
Last 25 attacks have come from:
188.209.49.164
77.75.79.62
23.228.96.82
108.172.246.109
134.249.54.230
77.75.77.17
46.229.168.149
46.229.168.132
157.55.39.104
40.77.167.6
46.119.115.106
77.75.77.11
157.55.39.52
37.187.95.218
91.210.145.247
77.75.78.162
94.158.245.114
77.75.76.162
34.217.84.79
185.225.17.191
185.220.101.44
103.243.25.104
46.119.121.84
77.75.78.163
46.229.168.138

There are currently 25 unique IP addresses blacklisted.

Public cruzit.com Server Status
server offline limelight  web service
 Aw Crap!, It's Off-Line
server offline limelight  mail service
 Aw Crap!, It's Off-Line
server online www  web service
 Is On-Line
server online mx 08  mail service
 Is On-Line
server online www01  F/O web service
 Is On-Line
server online mx 09  mail service
 Is On-Line
server online tertiary  DNS service
 Is On-Line
server online mx 10  mail service
 Is On-Line

©Copyright 2004-2019 - cruzit.com - Redd Enterprises™, Inc.,  All Rights Reserved.
Ubuntu® is a registered trademark of Canonical Ltd.
Linux® is a registered trademark of Linus Torvalds.
Apache® is a registered trademark of The Apache Software Foundation.
PHP® is a registered trademark of The PHP Group.
MySQL® is a registered trademark of MySQL AB in the United States, the European Union and other countries.
All other product and service names mentioned are the trademarks of their respective companies.

 

pretrial
pretrial
pretrial
pretrial
Let us know what you think! finance@homelandcomputersecurity.com