IE7 does not handle javascript redirect referers the same way, so here's a revised version of my script:
The first page is simple--redirects you to the 2nd page (one that will appear to have content):
HTML Code:
<body onload="javascript:frmTaco.submit();">
<form action="content5.php" method="get" name="frmTaco">
</form>
The second page shows content if the referer isn't the 1st page. If it is, then it sends them to the destination. (In this case it's the referer.php script.)
PHP Code:
<?php
//Compare the referer to the page they SHOULD come from
if ( $_SERVER['HTTP_REFERER'] == "http://www.drkenneth.mobi/demos/bouncer5.php" || $_SERVER['HTTP_REFERER'] == "http://drkenneth.mobi/demos/bouncer5.php" )
{
//Bounce the user to the destination
print <<<END
<body onload="javascript:frmTaco.submit();">
<form action="referer.php" method="get" name="frmTaco">
</form>
END;
}
else
{
//Act innocent--they didn't come through the bounce!
print <<<END
Hey!<br>
This is an innocent little page!<br>
No scripts or anything!<br>
Just lots of awesome content!<br>
People are just going to click links and buy stuff, cuz we have REAL traffic from HERE!<br>
Just a nice, happy, user friendly referral link to <a href="referer.php">referer.php</a><br>
See, click it! It's what all your viewers are doing!
END;
}
?>
Hope that helps anyone who was having any problems in IE7. Enjoy