Hi!
I've got a method for determining whether a document is loaded as a frame from a specific frameset or not, by checking the HTTP_REFERER for the name of the frameset document.
In short, I have a frameset document called theframes.php which loads the frames nav.php and main.php. The document main.php is not supposed to ever be allowed to load if it's not part of the frameset.
So here's what I have in the top of main.php:
if (!eregi("theframes", $HTTP_REFERER)) {
header("Location: theframes.php");
exit;
}
This works like a charm when I use my IE 6 on Windows XP. However, I just discovered that if a user comes with a Mac OS X browser (IE and Camino tested so far), the $HTTP_REFERER is left blank. I've since discovered that the HTTP_REFERER is only set if the web browser wants to set it, so this is obviously not the way for me to check this.
Now, does anybody out there have another idea on how I can make sure that main.nav is always loaded as part of my frameset?
Thanks!
//Mans