Click Here!
Evrsoft.com
  Web Development, Web design, HTML code, HTML tutorials, Javascripts, DHTML, ASP, Perl, CGI scripts  
YOU ARE HERE: Home : Articles : CGI Environment Variables
Web Hosting  •  Website Tools  •  HTML Tutorials  •  PHP Resources
List of CGI Environment Variables
One of the methods that the web server uses to pass information to a cgi script is through environmental variables. These are created and assigned appropriate values within the environment that the server spawns for the cgi script. They can be accessed as any other environmental variable, like with getenv() (in C) or %ENV{'VARIABLE_NAME'} (in Perl). Many of them, contain important information, that most cgi programs need to take into account. This list, highlights all of the most commonly used ones, along with the browser output.

 
HTML Comment Browser Output
<!--#echo var="auth_type" --> (none)
<!--#echo var="content_length" --> (none)
<!--#echo var="content_type" --> (none)
<!--#echo var="date_local" --> Friday, 24-Nov-2017 11:18:48 EST
<!--#echo var="date_gmt" --> Friday, 24-Nov-2017 16:18:48 GMT
<!--#echo var="document_name" --> ref_cgi_codes.shtml
<!--#echo var="document_root" --> /usr/home/web
<!--#echo var="document_uri" --> /~evrsoft/ref_cgi_codes.shtml
<!--#echo var="forwarded" --> (none)
<!--#echo var="from" --> (none)
<!--#echo var="gateway_interface" --> CGI/1.1
<!--#echo var="http_accept" --> */*
<!--#echo var="http_accept_charset" --> (none)
<!--#echo var="http_accept_encoding" --> gzip, deflate
<!--#echo var="http_accept_language" -->
<!--#echo var="http_cache_control" --> (none)
<!--#echo var="http_connection" --> Keep-Alive
<!--#echo var="http_cookie" --> (none)
<!--#echo var="http_form" --> (none)
<!--#echo var="http_host" --> developer.evrsoft.com
<!--#echo var="http_referrer" -->
<!--#echo var="http_ua_color" --> (none)
<!--#echo var="http_ua_cpu" --> (none)
<!--#echo var="http_ua_os" --> (none)
<!--#echo var="http_ua_pixels" --> (none)
<!--#echo var="http_user_agent" --> CCBot/2.0 (http://commoncrawl.org/faq/)
<!--#echo var="http_x_forwarded_for" --> (none)
<!--#echo var="instance_id" --> (none)
<!--#echo var="last_modified" --> Tuesday, 28-Oct-2003 10:21:33 EST
<!--#echo var="page_count" --> (none)
<!--#echo var="path" --> /root/bin:/usr/local/admin/bin:/sbin:/usr/sbin...
:/usr/local/bin:/bin:/usr/bin:/usr/contrib/bin:/usr/X11/bin
<!--#echo var="path_info" --> (none)
<!--#echo var="path_translated" --> (none)
<!--#echo var="query_string" -->
<!--#echo var="query_string_unescaped" --> (none)
<!--#echo var="remote_addr" --> 54.81.195.240
<!--#echo var="remote_host" --> 54.81.195.240
<!--#echo var="remote_ident" -->
<!--#echo var="remote_port" --> 56672
<!--#echo var="remote_user" -->
<!--#echo var="request_method" --> GET
<!--#echo var="request_uri" --> /~evrsoft/ ref_cgi_codes.shtml
<!--#echo var="script_filename" --> /~evrsoft/ ref_cgi_codes.shtml
<!--#echo var="script_name" --> /~evrsoft/ ref_cgi_codes.shtml
<!--#echo var="script_uri" --> http://developer.evrsoft.com/~evrsoft/ ref_cgi_codes.shtml
<!--#echo var="script_url" --> /~evrsoft/ ref_cgi_codes.shtml
<!--#echo var="server_admin" --> webmaster@evrsoft.com
<!--#echo var="server_addr" --> 184.171.249.194:80
<!--#echo var="server_name" --> developer.evrsoft.com
<!--#echo var="server_port" --> 80
<!--#echo var="server_protocol" --> HTTP/1.0
<!--#echo var="server_signature" -->
<!--#echo var="server_software" --> LiteSpeed
<!--#echo var="total_hits" --> (none)
<!--#echo var="tz" --> (none)
<!--#echo var="unique_id" -->
<!--#echo var="user_name" -->
<!--#echo var="visp_domain" --> (none)
<!--#echo var="visp_remote_addr" --> (none)
<!--#echo var="visp_user" --> (none)
   


.

News
  " TARGET="_blank">...

...

...

...

...

 
More News  
Interactive
A database error has occured!
Misc

Join our newsletter!
Join our eNewsletter
for software updates,
freebies and more!


      Subscribe
      Unsubscribe



30,674,408
Domains
Registered Worldwide
...more statistics

Click Here!

 


  Articles are submitted to EDN and licensed from various content sites.
  To report abuse, copyright issues, article removals, please contact [violations (at@) evrsoft.com]

  Copyright © Evrsoft Developer Network. Privacy policy - Link to Us

Contact Evrsoft