![]() | |
#1
| |||
| |||
|
|
On 02 Aug 2008, WebFoot <webfoot@.> wrote: Jerry Stuckle <jstucklex (AT) attglobal (DOT) net> sez: WebFoot wrote: Jerry Stuckle <jstucklex (AT) attglobal (DOT) net> sez: WebFoot wrote: Is there a reliable way for a webpage to either break out or refuse to display when a hostile website puts it in a frame? [snip] There is "somewhat" of a solution using the php $_SERVER['HTTP_REFERER'] superglobal. While, as the manual states, some browsers ignore or manipulate this, it is nevertheless statistically effective and certainly applicable to the situation you describe. My workup doesn't satisfy your "ideal" solution but I think it complies with your "ok" solution just fine. Using php sessions may allow the goal to be even better satisfied, but I think sessions have their own drawbacks. The code should be obvious, but if it isn't, I will post my own flavor upon request. |
#2
| |||
| |||
|
|
Is there a reliable way for a webpage to either break out or refuse to display when a hostile website puts it in a frame? [snip] There is "somewhat" of a solution using the php $_SERVER['HTTP_REFERER'] superglobal. While, as the manual states, some browsers ignore or manipulate this, it is nevertheless statistically effective and certainly applicable to the situation you describe. My workup doesn't satisfy your "ideal" solution but I think it complies with your "ok" solution just fine. Using php sessions may allow the goal to be even better satisfied, but I think sessions have their own drawbacks. The code should be obvious, but if it isn't, I will post my own flavor upon request. I would like to see an example. I just can't think of a way to use referer with or without a session to determine if a page has been framed or just an outside link. |
![]() |
| Thread Tools | |
| Display Modes | |
| |