GetServerVariable

From Catglobe Wiki
Revision as of 08:00, 22 March 2011 by Cg pham (talk | contribs)
Jump to: navigation, search



getServerVariable

Returns the string corresponding to the requested serverVariable.

Syntax

getServerVariable(serverVariable)

Arguments

serverVariable: a number expression. It must be one of 3 pre-defined constants:

  • HTTP_REFERER: Returns a string containing the URL of the page that referred the request to the current page using an <a> tag. If the page is redirected, HTTP_REFERER is empty
  • HTTP_USER_AGENT: Returns a string describing the browser that sent the request.
  • REMOTE_ADDR: Returns the IP address of the remote host making the request (reference: http://www.w3schools.com/asp/coll_servervariables.asp)

Return type

string

Examples

getServerVariable(HTTP_REFERER);

Availability

Version 5.3