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" --> Tuesday, 02-Dec-2008 10:25:07 EST
<!--#echo var="date_gmt" --> Tuesday, 02-Dec-2008 15:25:07 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" --> en-us,en;q=0.5
<!--#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" --> CCBot/1.0 (+http://www.commoncrawl.org/bot.html)
<!--#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" --> 38.103.63.60
<!--#echo var="remote_host" --> (none)
<!--#echo var="remote_ident" --> (none)
<!--#echo var="remote_port" --> 38347
<!--#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" --> 63.247.76.37
<!--#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/2.0.63 (Unix) mod_ssl/2.0.63 OpenSSL/0.9.8b mod_auth_passthrough/2.1 mod_bwlimited/1.4 FrontPage/5.0.2.2635 PHP/5.2.6
<!--#echo var="total_hits" --> (none)
<!--#echo var="tz" --> (none)
<!--#echo var="unique_id" --> 7q8YLz-3TCIAAD9euKcAAAAe
<!--#echo var="user_name" --> evrsoft
<!--#echo var="visp_domain" --> (none)
<!--#echo var="visp_remote_addr" --> (none)
<!--#echo var="visp_user" --> (none)
   


.

News
  Top Solar Stock Pick - SSLR...

Red Hat Spacewalk Expands ......

Reading Guide To AI Design & Neural Networks?...

Hire Web Developers for your Custom Website Development Requirement from Percep...

html> head>title>My Way News - Travel pinched by global financial crisis)">Travel pinched by global financial crisis...

 
More News  
Interactive
Best feature on this site?
Articles Index
Discussion Forum
Links Directory
Webmaster Tools
Online News
 
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!

 

Sites of interest: Affordable Web Hosting : Reseller Hosting : Website Hosting : HTML Editor : Website Templates : Free Web Hosting : ASP code examples : PHP & MySQL Code Examples : Web Hosting News
  Articles are submitted to EDN and licensed from various content sites.
  To report abuse, copyright issues, article removals, please contact [violations@ evrsoft.com]

  Copyright (C) 2005 Evrsoft Developer Network. Privacy policy - Link to Us

Contact Evrsoft