I'm trying to get the filename of a http_referer. I.E Strip the accompyaning URL and leave index.php.
I know how to get the filename of the current file:
$userFile = basename($_SERVER['PHP_SELF']);
But when I replace 'PHP_SELF' with HTTP_REFERER, I get the error:
Notice: Undefined index: HTTP_REFERER in /var/www/httpdocs/test.php on line 3
How can I do this?