cgi-dev

Repository that serves as my CGI "scratchpad" to try things out.
git clone git://git.samirparikh.com/cgi-dev
Log | Files | Refs | README

server_info.cgi (828B) - raw


      1 #!/usr/bin/perl -wT
      2 
      3 print <<END_OF_HTML;
      4 Content-type: text/html
      5 
      6 <HTML>
      7 <HEAD>
      8     <TITLE>About this Server</TITLE>
      9 </HEAD>
     10 <BODY>
     11 <H1>About this Server</H1>
     12 <HR>
     13 <PRE>
     14   Server Name:       $ENV{SERVER_NAME}
     15   Listening on Port: $ENV{SERVER_PORT}
     16   Server Software:   $ENV{SERVER_SOFTWARE}
     17   Server Protocol:   $ENV{SERVER_PROTOCOL}
     18   CGI Version:       $ENV{GATEWAY_INTERFACE}
     19   -------------------------
     20   Content Length:    $ENV{CONTENT_LENGTH}
     21   Content Type:      $ENV{CONTENT_TYPE}
     22   Document Root:     $ENV{DOCUMENT_ROOT}
     23   Query String:      $ENV{QUERY_STRING}
     24   Remote Address:    $ENV{REMOTE_ADDR}
     25   Remote Host:       $ENV{REMOTE_HOST}
     26   -------------------------
     27   Referer:	     $ENV{HTTP_REFERER}
     28   User Agent:        $ENV{HTTP_USER_AGENT}
     29   HTTPS(?):          $ENV{HTTPS}
     30 </PRE>
     31 <HR>
     32 </BODY>
     33 </HTML>
     34 END_OF_HTML