PDA

Click to See Complete Forum and Search --> : System Uptime in PHP


freeOn
May 7th, 2002, 07:01 AM
I'm running Apache Win32 for my webserver and was loooking for somthing on the net that could get my system uptime in php. I looked at php.net and read the HTTP thing didn't see anything that could help. Does anyone know a way to do it?

meister
May 7th, 2002, 07:26 PM
try the following:
download uptime.exe from microsoft
copy the app into the same directory as your php script
write php script:

PRINT exec("cmd /c uptime");

this should show uptime
there is also the possibility to do this with perl (if you can)
http://www.planet-source-code.com/vb/scripts/ShowCode.asp?txtCodeId=75&lngWId=6


----------------------------------------------------------------------------------------------------------
"Knowledge is the Real Power"