Home     SSI Lab     CSS Templates     CSS     Htaccess     Web Design     XHTML

X-SSI Lab

graphic-img   

SSI-D HOME

SSI LAB

Introductory Topics

SSI Directives

Extending SSI

Apps/Examples

Top Resources

CSS Templates

CSS

.Htaccess

Web Design

(X)HTML

HTML-Kit

Resources





SSI Echo Command

Introduction

The echo command inserts the contents of a HTTP environment variable into the response stream being sent to the client replacing the ssi directive.


Examples and Results of Echo Commands

Your IP Address is: <!--#echo var="REMOTE_ADDR" -->
Your IP Address is: 12.34.45.67


Your browser is: <!--#echo var="HTTP_USER_AGENT" -->
Your browser is: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0)


You came from: <!--#echo var="HTTP_REFERER" -->
You came from: http://www.somedom.com/links.htm


The name of this document is: <!--#echo var="DOCUMENT_NAME" -->
The name of this document is: ssi-echo.shtml


The URI of this document is: <!--#echo var="DOCUMENT_URI" -->
The URI of this document is: /main/directory/ssi-echo.htm


This document was last modified: <!--#echo var="LAST_MODIFIED" -->
This document was last modified: Saturday, 28-Sep-02 21:51:00 UTC+0300


You are logged in as: <!--#echo var="REMOTE_USER" -->
You are logged in as: User17


Todays date (GMT)is: <!--#echo var="DATE_GMT" -->
Todays date (GMT)is: Saturday, 28-Sep-02 21:51:00 GMT




Echo Commands


AUTH_TYPE : the type of authentication that the client and server used if this page denied anonymous access, e.g. 'Basic' or 'NTLM'

(none)

AUTH_PASSWORD : the password provided by the user to the server if this page denied anonymous access and the client authenticated using the Basic method.

(none)

AUTH_USER : the username provided by the user to the server if this page denied anonymous access under both Basic and NTLM methods.

(none)

CONTENT_LENGTH : the number of bytes of data sent as a POST to the server.

(none)

CONTENT_TYPE : the MIME type of the data sent as a POST to the server.

(none)

DOCUMENT_NAME : the full physical path and filename of the document requested.

ssi-echo.shtml

DOCUMENT_ROOT : the root directory of the site.

/usr/local/4admin/apache/vhosts/ssi-developer.net/httpdocs

DOCUMENT_URI : the full virtual path and filename of the document requested in relation to the root folder of the web site.

/ssi/ssi-echo.shtml

DATE_LOCAL : the current date and time of the server after adjustment from GMT.

Saturday, 25-Oct-2014 03:43:22 EDT

DATE_GMT : the current date and time of the server without any adjustment from GMT.

Saturday, 25-Oct-2014 07:43:22 GMT

GATEWAY_INTERFACE : the type of gateway used to handle the request, e.g. CGI/1.1

CGI/1.1

HTTP_ACCEPT : a comma-delimited list of MIME types that the client application has notified the server that it can accept.

text/xml,application/xml,application/xhtml+xml, text/html;q=0.9, text/plain;q=0.8, image/png, */*;q=0.5

HTTP_ACCEPT_ENCODING : a comma-delimited list of MIME types that the client application has notified the server that it can accept.

x-gzip, gzip, deflate

HTTP_ACCEPT_LANGUAGE : The LANGUAGE types the server is requested to accept as defined in the HTTP header and typically used for content negotiation.

en-us,en-gb,en;q=0.7,*;q=0.3

HTTP_CONNECTION : The type of connection as defined in the HTTP header.

(none)

HTTP_HOST : The base URL of this host.

www.ssi-developer.net

HTTP_REFERER : The URL of the page that made the request.

(none)

HTTP_USER_AGENT : The browser id or user-agent string identifying the browser.

CCBot/2.0 (http://commoncrawl.org/faq/)

LAST_MODIFIED : the date and time the document was last modified.

Saturday, 11-Sep-2004 13:06:59 EDT

PATH_INFO : the full virtual path and filename of the document requested, in relation to the root folder of the web site.

(none)

PATH_TRANSLATED : the full physical path and filename of the document requested.

(none)

QUERY_STRING : the value of any query string appended to the URL of the document requested, after translation from the URL-encoded format.

QUERY_STRING_UNESCAPED : the value of any query string appended to the URL of the document requested, before translation from the URL-encoded format.

(none)

REMOTE_ADDR : the IP address of the client machine that requested the page.

54.89.68.105

REMOTE_HOST : the host name or IP address of the network from which the client requested the page.

(none)

REMOTE_PORT : the port number used by the remote host when making this request.

33827

REMOTE_USER : the name (if available) of the client machine that requested the page/username entered by the remote client

(none)

REQUEST_METHOD : the method used when requesting the page, 'Get' 'Head' or 'Post'

GET

REQUEST_URI : the URI of the requested page, relevant to the document root.

/ssi/ssi-echo.shtml

SCRIPT_NAME : the full virtual path and filename of the document requested in relation to the root folder of the web site.

/ssi/ssi-echo.shtml

SERVER_ADDR : the IP address of the server for this URL.

66.230.196.36

SERVER_ADMIN : the administrators email address for this server.

admin@webmasters.com

SERVER_NAME : the network name or URL host name of the server that received the request.

www.ssi-developer.net

SERVER_PORT : the port number on which the request was received, '80' for a normal web page requests and '443' for SSL secure requests.

80

SERVER_PORT_SECURE : the port number if the request was over a secure protocol.

(none)

SERVER_SIGNATURE : The HTML string that may be embedded in the page to identify this host .

<ADDRESS>Apache/1.3.42 Ben-SSL/1.60 Server at www.ssi-developer.net Port 80</ADDRESS>

SERVER_SOFTWARE : the name/version of the web server.

Apache/1.3.42 Ben-SSL/1.60 (Unix) mod_gzip/1.3.26.1a mod_fastcgi/2.4.6 mod_throttle/3.1.2 Chili!Soft-ASP/3.6.2 FrontPage/5.0.2.2635 mod_perl/1.31 PHP/4.4.9

SERVER_PROTOCOL : the HTTP protocol that the request was passed under, HTTP/1.1

HTTP/1.0

PAGE_COUNT : number of hits on the current document since server came on-line

(none)

TOTAL_HITS : number of documents server has served since coming on-line

(none)

REFERRER : The URL of the document the viewer came from

(none)

URL : the complete URL that the user specified when requesting the document.

(none)

ALL_HTTP : all the name/value pairs for HTTP environment variables.

(none)




Advertisement Sign up for free to PayBox.me today and get $25 just for joining AND earn up to $20 per day for participating.