Friday, July 2, 2010

Environmental Variables (SERVER FUNCTIONS)

CONTENT_LENGTH : It takes information about POST method from FORM.

DOCUMENT_ROOT : It keeps path.

HTTP_COOKIE : It is variable which keeps cookies .

HTTP_HOST : Host name or Host adress .



HTTP_REFERER : It keeps adress of connected page .

HTTP_USER_AGENT : It keeps Browser type and version .

QUERY_STRING : It keeps information which is sent by GET method.

REMOTE_ADDR : It keeps IP ADRESS of visitor .

REMOTE_HOST : Name or IP ADRESS of visitor computer .

REMOTE_PORT : Connection PORT .

REMOTE_USER : It is User name which is using in cryptic pages and .htaccess file.

REQUEST_METHOD : It keeps type of Action method (GET or POST) .

SERVER_ADMIN : E-mail adress of ADMINISTRATOR .

SERVER_NAME : DNS name.

SERVER_PORT : Port adress of SITE(GENERALLY 80) .


For Example,Lets learn browser type by using variable of HTTP_USER_AGENT


<?php


echo $_SERVER['HTTP_USER_AGENT'];

?>

No comments:

Post a Comment