Way back in ancient times, when the ftp protocol was being thrashed out, someone thought that a referrer field would be a good idea.
Unfortunately, someone misspelled the word.
And it's still spelled wrong in the http protocol.
Try
$HTTP_REFERER
Depending on your PHP version/configuration, you may have to use
$HTTP_SERVER_VARS['HTTP_REFERER']
or
$_SERVER['HTTP_REFERER']
Whichever way, 'referrer' is misspelled.