Hello,
I am currently using the following code below to display two different codes depending on referrers. It came to my attention that if the page is visited from a direct url or a bookmark for example, the include is not working. It only works if the page is visited from "somewhere".
As such, I wish to ask if someone may be able to "fix" the code. Basically, I wish to display the first code if the visitor comes from domain.com otherwise, the include is displayed no matter where else they come from. Thank you in advance.
PHP Code:
if(isset($_SERVER['HTTP_REFERER'])) {
$referrer = $_SERVER['HTTP_REFERER'];
if(stristr($referrer, 'domain.com')) {
echo '<INSERT CODE>';
} else {
include $_SERVER['DOCUMENT_ROOT'].("/path/to/file.html");
}
}