PHP
Name | Value |
HTTP_REFERER | If the user clicked a link to get the current page, this will contain the URL of the previous page they were at, or it will be empty if the user entered the URL directly. |
HTTP_USER_AGENT | The name reported by the visitor's browser |
PATH_INFO | Any data passed in the URL after the script name |
PHP_SELF | The name of the current script |
REQUEST_METHOD | Either GET or POST |
QUERY_STRING | Includes everything after the question mark in a GET request |
<?php if (isset($_SERVER['HTTP_REFERER'])) { print "The page you were on previously was {$_SERVER['HTTP_REFERER']}<br />"; } else { print "You didn't click any links to get here<br />"; } ?> <a href="refer.php">Click me!</a>
5 of 33