BetaArchive Logo
Navigation Home Screenshots Image Uploader Server Info FTP Servers Wiki Forum RSS Feed Rules Please Donate
UP: 5d, 18h, 34m | CPU: 18% | MEM: 2068MB of 3637MB used
{The community for beta collectors}

Forum rules


Any off topic discussions should go in this forum. Post count is not increased by posting here.
FTP Access status is required to post in this forum. Find out how to get it


Post new topic Reply to topic  [ 6 posts ] 
Author Message
 PostPost subject: Uptime code??        Posted: Fri Mar 21, 2008 9:15 pm 
Reply with quote
Staff
User avatar
Offline

Joined
Thu Nov 30, 2006 6:10 pm

Posts
2629

Location
Land of The Tea.

Favourite OS
Windows 10 Pro x64
Is there any sort of code to find the servers uptime?
This would be helpful for a page im making and would it work for getting the uptime of another server?

_________________
Image
| Personal site - Social links - PC setup | TF2 Game Servers |
Liking traps isn't gay, its not gay if it looks like a girl
I-i-it's n-not as if I wanted to ban you or anything. B-baka. (「・ω・)「


Top  Profile  WWW
 PostPost subject:        Posted: Sat Mar 22, 2008 12:11 am 
Reply with quote
FTP Access
Offline

Joined
Tue Oct 23, 2007 11:21 pm

Posts
594
You can use this utility for Windows servers:

http://www.betaarchive.co.uk/uptime.exe

Put on the same dir as the script.
PHP:

Code:
echo passthru("uptime.exe HOST");


...where HOST is the desired host in UNC format, leave blank for local machine.


Top  Profile
 PostPost subject:        Posted: Sat Mar 22, 2008 10:23 am 
Reply with quote
Staff
User avatar
Offline

Joined
Thu Nov 30, 2006 6:10 pm

Posts
2629

Location
Land of The Tea.

Favourite OS
Windows 10 Pro x64
UNC format?

_________________
Image
| Personal site - Social links - PC setup | TF2 Game Servers |
Liking traps isn't gay, its not gay if it looks like a girl
I-i-it's n-not as if I wanted to ban you or anything. B-baka. (「・ω・)「


Top  Profile  WWW
 PostPost subject:        Posted: Sat Mar 22, 2008 12:22 pm 
Reply with quote
FTP Access
Offline

Joined
Tue Oct 23, 2007 11:21 pm

Posts
594
Simple as 1-2-3:

\\SERVERNAME


Top  Profile
 PostPost subject:        Posted: Sun Mar 23, 2008 4:11 am 
Reply with quote
FTP Access
Offline

Joined
Sat Nov 17, 2007 7:32 am

Posts
71
Is there an easy program like that for Linux/BSD servers?


Top  Profile
 PostPost subject:        Posted: Sun Mar 23, 2008 5:06 am 
Reply with quote
Donator
Offline

Joined
Fri Aug 18, 2006 12:05 pm

Posts
698

Location
Or-stray-liagh
ftgba2244 wrote:
Is there an easy program like that for Linux/BSD servers?


The command on Linux is called uptime... so you could go echo passthru("uptime");

_________________
pr0gram the pr0grammer
BetaArchive retiree | OSBA Expat


Top  Profile
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 6 posts ] 




Who is online

Users browsing this forum: Google [Bot] and 5 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Jump to:  

All views expressed in these forums are those of the author and do not necessarily represent the views of the BetaArchive site owner.

Powered by phpBB® Forum Software © phpBB Group

Copyright © 2006-2018

 

Sitemap | XML | RSS