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" --> Thursday, 02-Sep-2010 12:14:12 EDT
<!--#echo var="date_gmt" --> Thursday, 02-Sep-2010 16:14:12 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.107.191.82
<!--#echo var="remote_host" --> (none)
<!--#echo var="remote_ident" --> (none)
<!--#echo var="remote_port" --> 55090
<!--#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.8e-fips-rhel5 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" --> GtRkND-3TCIAAA9mU3UAAABT
<!--#echo var="user_name" --> evrsoft
<!--#echo var="visp_domain" --> (none)
<!--#echo var="visp_remote_addr" --> (none)
<!--#echo var="visp_user" --> (none)
   


.

News
  Atlanta: Mom turns $97 into $6,593...

China Demands Real Names From Mobile Phone Users...

Snoop Dogg Joins the War On Cybercrime...

Web Host 11 Internet Adds Tools For Creating Mobile-Optimized Websites...

3 Web Tools for Better Graphics...

 
More News  
Interactive
What's the best web browser ever developed?
Firefox
Internet Explorer
Mozilla
Opera
Safari
Lynx
Other
 
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: : Free Website Templates : Affordable Web Hosting : Website Templates : Reseller Hosting : Website Templates : Affordable Hosting : Web Templates : WordPress Themes : Website Templates : HTML Editor : Website Templates : Wordpress Themes : Website Templates : Free Website Templates : Website Templates : WordPress Themes : Website Templates
  Articles are submitted to EDN and licensed from various content sites.
  To report abuse, copyright issues, article removals, please contact [violations@ evrsoft.com]

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

Contact Evrsoft