$ENV{'HTTP_USER_AGENT'}, $ENV{'SERVER_PROTOCOL'}, $ENV{'HTTP_HOST'} : Environment Variables « CGI « Perl






$ENV{'HTTP_USER_AGENT'}, $ENV{'SERVER_PROTOCOL'}, $ENV{'HTTP_HOST'}

    

#!/usr/bin/perl

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

print "Your browser is a $ENV{'HTTP_USER_AGENT'} <BR>";
print "The Server Protocol is $ENV{'SERVER_PROTOCOL'}<BR>";
print "The HTTP Host is $ENV{'HTTP_HOST'}<BR>";

   
    
    
    
  








Related examples in the same category

1.Display CGI environment variables
2.Viewing Environment Variables in a CGI Script
3.CGI Environment Variables
4.Learn about the server for a CGI request
5.Program to display CGI environment variables.
6.Get and display the browser type by referencing HTTP_USER_AGENT
7.Server Environment Values
8.CGI request-related environment variables
9.CGI server-related environment variables
10.CGI client-related environment variables
11.HEADER DESCRIPTION
12.Display all values in env
13.Determining the User Agent and Printing the Appropriate Result
14.CGI Environment Variables (Must Be Uppercase)
15.CGI environment variable
16.An example of using QUERY_STRING.