hello all, I want to add second url to the allowed referrer. Can anyone help me. define('ALLOWED_REFERRER', 'xxx.net/index.php?page=course-req'); if (ALLOWED_REFERRER !== '' && (!isset($_SERVER['HTTP_REFERER']) || strpos(strtoupper($_SERVER['HTTP_REFERER']),strtoupper(ALLOWED_REFERRER)) === false)) { die("You can not view this page directly. Please contact ."); } PHP:
define('ALLOWED_REFERRER', 'xxx.net/index.php?page=course-req'); define('ALLOWED_REFERRER2', 'new.url/new'); if ((ALLOWED_REFERRER !== '') && (ALLOWED_REFERRER2 !== '') && (!isset($_SERVER['HTTP_REFERER']) || !(strpos(strtoupper($_SERVER['HTTP_REFERER']),strtoupper(ALLOWED_REFERRER2)) === false) && strpos(strtoupper($_SERVER['HTTP_REFERER']),strtoupper(ALLOWED_REFERRER)) === false))) { die("You can not view this page directly. Please contact ."); }