This tutorial will teach you how to display server information with Perl.
Code
NotesCode:#!/usr/bin/perl use strict; print "Content-type: text/html\n\n <html> <head> <title>Display Server Information</title> </head> <body> <h1>Server Information</h1> <hr> <pre> *Server Name: *$ENV{SERVER_NAME} #Server Name *Server Port: *$ENV{SERVER_PORT} #Server Port *Server Software: $ENV{SERVER_SOFTWARE} #Server Software *Server Protocol: $ENV{SERVER_PROTOCOL} #Server Protocol </pre> <hr> </font> </body> </html>";
- Remember to Chmod File to 0755 or higher
- File must be placed in the CGI-BIN
Example Here