Let me try and explain this better 🙂
All browsers work fine if I setup my script this way.
++CASE # 1++++++++++++++++++
file.html
<a href="viewfile.php">view file here</a>
viewfile.php
<?
$dim = getenv("HTTP_REFERER");
echo "$dim";
switch ($_SERVER['HTTP_REFERER']) {
case "http://www.yahoo.com":
echo "it works!";
break;
default:
echo "please contact support at [email]a@a.org[/email]";
exit;
// And the rest...
}
?>
++CASE # 2++++++++++++++++++
IE will not pass HTTP_REFERER if I use a javascript window. However, Netscape and Firefox works fine.
file.html
<SCRIPT LANGUAGE="JavaScript">
var newwindow;
function 1pops(url)
{
newwindow=window.open(url,'name','height=393,width=349');
if (window.focus) {newwindow.focus()}
}
</script>
<a href="java script:1pops('../../viewfile.php?file=word.doc');" >Some link</a>
viewfile.php
<?
$dim = getenv("HTTP_REFERER");
echo "$dim";
switch ($_SERVER['HTTP_REFERER']) {
case "http://www.yahoo.com":
echo "it works!";
break;
default:
echo "please contact support at [email]a@a.org[/email]";
exit;
// And the rest...
}
?>