Get the page address that referred to the current page in PHP

Description

The following code shows how to get the page address that referred to the current page.

Example


<?php/*from ww  w  . ja  va  2s . c om*/
$referer = $_SERVER['HTTP_REFERER'];
echo $referer;

?>




















Home »
  PHP Tutorial »
    Development »




Environment
Error
Hash
Include
Locale
Math
Network
Output
Reflection
PHP Regular Expressions