0

I created this into a cgi file

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

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

print <<EOM;
<META HTTP-EQUIV="Refresh" CONTENT=15>
<TITLE> $ENV{SERVER_NAME} HTTPD Load </TITLE>

<H2> Current load average of
<A HREF=/>$ENV{SERVER_NAME}</A><HR></H2>
EOM

print `uptime`;
print "<P>";

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

5
Contributors
5
Replies
6
Views
13 Years
Discussion Span
Last Post by i686-linux
0

you can use <iframe> tag provided by html

or use php

<?php
$data = shell_exec(uptime); 
echo $data;
?>
Votes + Comments
Nice answer.
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)

Votes + Comments
Frames suck - you have it 100% right.
0

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.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.