You are here: uptime script for openbsd « PHP Programming Language « IT news, forums, messages
uptime script for openbsd

Posted by streamkid on 04/10/07 15:48

hello..
could anyone please help me build a uptime script for openbsd?
i tried phpsysinfo, it doesn't work (only uptime works, and that's
around 15k days :p)
i tried these:

<?php
$uptime_output = system("uptime", $uptime_output);
print $uptime_output;
?>

<?php
$uptime = shell_exec("cut -d. f1 /proc/uptime");
$days = floor($uptime/60/60%24);
$hours = $uptime/60/60%24;
$mins = $uptime%60;
$secs = $uptime%60;
echo "current uptime is $days days, $hours hours, $mins minutes and
$secs seconds";
?>

but none of these works.

i 'd appreciate your help
tia, alex

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация