It is worthwhile to check with phpinfo() function if sever variables are all available for your server to implement the code as below.
$pos = strpos($_SERVER['HTTP_REFERER'],$_SERVER['HTTP_HOST']);
if($pos===false)
die('Restricted access');
It is worthwhile to check with phpinfo() function if sever variables are all available for your server to implement the code as below.
$pos = strpos($_SERVER['HTTP_REFERER'],$_SERVER['HTTP_HOST']);
if($pos===false)
die('Restricted access');