Author Topic: Where did I see that "server uptime" script  (Read 2035 times)

0 Members and 1 Guest are viewing this topic.

Offline sam2004gp

  • Mount Crawford, Virginia
  • Forecaster
  • *****
  • Posts: 2865
  • Weeeeeeeee!!!!
    • Mount Crawford Weather, VA
Where did I see that "server uptime" script
« on: March 17, 2009, 06:05:59 PM »
In relation to this thread:   http://www.wxforum.net/index.php?topic=3700.msg30724#msg30724

I thought I saw a PHP script that would display your "machine uptime" on your web page. 

Can anyone point me in the right direction?  I did a forum search for it, but could not find it. #-o
SAM --->>> http://www.mountcrawfordweather.org
OS WMR-968 with a Dedicated PWS Weather Computer running VWS v13.01 p09


Offline Axelvold

  • Forecaster
  • *****
  • Posts: 1704
    • Axelvold's weather and photo
Re: Where did I see that "server uptime" script
« Reply #1 on: March 17, 2009, 06:15:14 PM »
here it is,

Code: [Select]
  <?PHP
$utime = file_get_contents('C:/path/path/wuptime.txt');
$utime = substr("$utime", 24);
$utime =  str_replace("(s)", 's', $utime);
$utime =  str_replace("minutes", 'minutes', $utime);
$splita = explode(',', $utime);
echo "Last server restart","$splita[0], $splita[1], $splita[2]";
?>

and you could find more information at http://weather.anolecomputer.com and here http://www.microsoft.com/technet/archive/winntas/downloads/uptime.mspx?mfr=true

for there are more files needed
« Last Edit: March 17, 2009, 06:17:14 PM by Axelvold »
Lars Magnusson
Axelvold / Sweden
55 57' 41" N / 13 6' 1" E
WX Station: Davis Vantage Pro2 Plus

Offline sam2004gp

  • Mount Crawford, Virginia
  • Forecaster
  • *****
  • Posts: 2865
  • Weeeeeeeee!!!!
    • Mount Crawford Weather, VA
Re: Where did I see that "server uptime" script
« Reply #2 on: March 17, 2009, 06:19:51 PM »
Thanks Lars, you are the man! :grin: =D&gt;
SAM --->>> http://www.mountcrawfordweather.org
OS WMR-968 with a Dedicated PWS Weather Computer running VWS v13.01 p09


Offline Axelvold

  • Forecaster
  • *****
  • Posts: 1704
    • Axelvold's weather and photo
Re: Where did I see that "server uptime" script
« Reply #3 on: March 17, 2009, 06:21:25 PM »
Thanks Lars, you are the man! :grin: =D&gt;

I do my best  8-)
Lars Magnusson
Axelvold / Sweden
55 57' 41" N / 13 6' 1" E
WX Station: Davis Vantage Pro2 Plus

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9015
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: Where did I see that "server uptime" script
« Reply #4 on: March 17, 2009, 06:47:06 PM »
The thread you were thinking of is probably http://www.wxforum.net/index.php?topic=299.0 and Lars has summarized it quite well :)

Best regards,
Ken
Ken True/Saratoga, CA, USA main site: saratoga-weather.org
Davis VP1+ FARS, Blitzortung RED, GRLevel3, WD, WL, VWS, Cumulus, Meteobridge
Free weather PHP scripts/website templates - update notifications on Twitter saratogaWXPHP

Offline sam2004gp

  • Mount Crawford, Virginia
  • Forecaster
  • *****
  • Posts: 2865
  • Weeeeeeeee!!!!
    • Mount Crawford Weather, VA
Re: Where did I see that "server uptime" script
« Reply #5 on: March 17, 2009, 06:49:35 PM »
Yep thanks Ken, I just got there to his page http://scripts.anolecomputer.com/download.shtml  right before you posted it.
I guess I first saw it when I started using and implemented the wxgraphics php.


« Last Edit: March 17, 2009, 06:52:01 PM by sam2004gp »
SAM --->>> http://www.mountcrawfordweather.org
OS WMR-968 with a Dedicated PWS Weather Computer running VWS v13.01 p09