I know this may be a duplicate of another link on here but I am not able to find a fix for my code.
I am trying to make a puzzle for my friends and family can try to do and I need a way to track what website they just came from so I know whether to send them to the next puzzle/win screen, or to send them to a page effectively saying they are cheaters. I am trying to use $_SERVER[HTTP_REFERER] to make this easier for me, but I want to echo out the address that the user is coming from to test my code, and I keep getting an index error.
MY CODE:
<?php
$_SERVERADDR=$_SERVER['HTTP_REFERER'];
echo "$_SERVERADDR";
?>
I keep getting an index error on this line $_SERVERADDR=$_SERVER['HTTP_REFERER'];
Can anyone help out?