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" --> Sunday, 22-Dec-2024 10:41:24 EST
<!--#echo var="date_gmt" --> Sunday, 22-Dec-2024 15:41:24 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" --> (none)
<!--#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" --> (none)
<!--#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" --> Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)
<!--#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" --> 3.145.35.234
<!--#echo var="remote_host" --> (none)
<!--#echo var="remote_ident" --> (none)
<!--#echo var="remote_port" --> 18026
<!--#echo var="remote_user" --> (none)
<!--#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
<!--#echo var="server_name" --> developer.evrsoft.com
<!--#echo var="server_port" --> 80
<!--#echo var="server_protocol" --> HTTP/1.1
<!--#echo var="server_signature" -->
<!--#echo var="server_software" --> Apache
<!--#echo var="total_hits" --> (none)
<!--#echo var="tz" --> (none)
<!--#echo var="unique_id" --> Z2gzJLIMXGGLxB-znRgFwAAAAEg
<!--#echo var="user_name" --> evrsoft
<!--#echo var="visp_domain" --> (none)
<!--#echo var="visp_remote_addr" --> (none)
<!--#echo var="visp_user" --> (none)
   


.

News
  " TARGET="_blank">...

...

...

...

...

 
More News  
Interactive
[an error occurred while processing this directive]
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