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 " ";
#!/usr/bin/perl # # sload - current server load #
print "Content-type: text/html\n\n";
print < $ENV{SERVER_NAME} HTTPD Load
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
I don't think you can have CGI in an HTML file?
you can use tag provided by html
or use php [php]<?php $data = shell_exec(uptime); echo $data; ?>[/php]
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)
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.
What http server are you using? I would recommend a SSI (server-side include) if possible.