954,541 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Uptime

I created this into a cgi file

#!/usr/bin/perl # # sload - current server load #

print "Content-type: text/html\n\n";

print < $ENV{SERVER_NAME} HTTPD Load

Current load average of $ENV{SERVER_NAME}

EOM

print `uptime`; print "

";

Now I want that on my website.. how do I create the html to show it on my index.htm instead of having another window poping up showing the uptime.cgi

root
Junior Poster
106 posts since May 2003
Reputation Points: 13
Solved Threads: 0
 

I don't think you can have CGI in an HTML file?

Gary King
PHP/vBulletin Guru
Team Colleague
417 posts since Nov 2003
Reputation Points: 53
Solved Threads: 5
 

you can use tag provided by html

or use php
[php]<?php
$data = shell_exec(uptime);
echo $data;
?>[/php]

jayant
Junior Poster in Training
95 posts since Nov 2003
Reputation Points: 46
Solved Threads: 1
 

Yep, but remember that it must be a PHP file then if you want to use PHP (unless you use frames again, which I highly dislike personally :p)

Gary King
PHP/vBulletin Guru
Team Colleague
417 posts since Nov 2003
Reputation Points: 53
Solved Threads: 5
 

You should be able to cross over into a small flash button or half banner and embed that code...I think...not sure on that.

TKS
Posting Pro in Training
470 posts since Jan 2004
Reputation Points: 108
Solved Threads: 18
 

What http server are you using? I would recommend a SSI (server-side include) if possible.

i686-linux
Posting Whiz in Training
210 posts since Mar 2004
Reputation Points: 87
Solved Threads: 12
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You