Hi,
I have ran into a problem with a script I am using that shows content to a visitor based upon their browser referer. Here is the relevant portion of the script:
<?php
$allowed_referers[0] = "allowedwebsite.com";
$ok_mode = 0;
if((in_array(parse_url($_SERVER['HTTP_REFERER'],PHP_URL_HOST), $allowed_referers) && $_SERVER['HTTP_REFERER'] != "") || $ok_mode)
{
}
?>
It works fine until I want to add additional allowed referers and that is where I encounter a problem. I would like to either add the list (which includes about 15 allowed referers) into the script or add a function that will retrieve the allowed referers from a text document.
Any help would be greatly appreciated.