Re: Fwd: Re: uptime and php

Top Page
Attachments:
Message as email
+ (text/plain)
Delete this message
Reply to this message
Author: mike hoy
Date:  
To: plug-discuss
Subject: Re: Fwd: Re: uptime and php
Richard,

great job! thanks. you are now officially a Guru of Computer Wisdom.

BTW i don't know how official these titles are so..


Mike H



Richard Whitney wrote:

>Made a mistake:
>
><?php
>    $uptime = exec('uptime');
>    echo $uptime;
>    $up = explode(',',$uptime);
>    $updays = explode(' up ',$up[0]);
>    echo $updays[1];
>?>

>
>----- Forwarded message from Richard Whitney <> -----
>    Date: Mon,  3 Jan 2005 13:15:15 -0700
>    From: Richard Whitney <>
>Reply-To: Richard Whitney <>
> Subject: Re: uptime and php
>      To: 

>
>Quoting mike hoy <>:
>
>
>
>>Gurus of computer wisdom...
>>
>>for the heck of it decided to add #uptime to my site
>>
>>just to hopefully one day brag how long my linux server has been running
>>
>>so i found a php function that displays uptime:
>>
>><?php
>>
>>
>      $uptime = exec('uptime');

>
>
>>    $up = explode(',',$uptime);

>>
>>
>      $updays = explode(' up ',$up);
>      echo $updays[1];

>
>
>>?>
>>
>>the only problem is that #uptime outputs too much info..
>>
>>ex: 13:11:38 up 12 days, 21:40, 4 users, load average: 0.00, 0.00, 0.02
>>
>>I check the man page to see if there was a flag that I could use with
>>#uptime so I would only get something like
>>
>>12 days
>>
>>
>>any ideas?
>>
>>mike h
>>
>>---------------------------------------------------
>>PLUG-discuss mailing list -
>>To subscribe, unsubscribe, or to change you mail settings:
>>http://lists.PLUG.phoenix.az.us/mailman/listinfo/plug-discuss
>>
>>
>>
>
>
>R. Whitney
>Transcend Development
>"Producing the next phase of your internet presence"
>http://xend.net
>Premium Quality Web Hosting
>http://xendhosting.com
>rw AT xend.net
>Net Binder http://netbinder.net
>310-943-6498
>602-288-5340
>
>
>----- End forwarded message -----
>
>
>R. Whitney
>Transcend Development
>"Producing the next phase of your internet presence"
>http://xend.net
>Premium Quality Web Hosting
>http://xendhosting.com
>rw AT xend.net
>Net Binder http://netbinder.net
>310-943-6498
>602-288-5340
>
>---------------------------------------------------
>PLUG-discuss mailing list -
>To subscribe, unsubscribe, or to change you mail settings:
>http://lists.PLUG.phoenix.az.us/mailman/listinfo/plug-discuss
>
>
>
>



---------------------------------------------------
PLUG-discuss mailing list -
To subscribe, unsubscribe, or to change you mail settings:
http://lists.PLUG.phoenix.az.us/mailman/listinfo/plug-discuss