I’m trying to show content based on the referring url. I tried some php code in my template that looks like this:
<?php
if( $_SERVER['HTTP_REFERER'] == "http://www.mysite.com/download" ) {
?>
<h1>You have access.</h1>
<?
} else {
?>
<h1>Sorry, you don't have access.</h1>
<?
}
?>I’m wanting people to have access to certain content on a page, but only if they link to that page from the http://www.mysite.com/download page.
This isn’t working. Anyone have some great ideas on how to do this?