Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Pages: 1
#1 2006-09-14 00:57:42
- NyteOwl
- Member

- From: Nova Scotia, Canada
- Registered: 2005-09-24
- Posts: 539
PHP question
Maybe this would have been better placed in the HowTo? section but as it isn’t specifically textpattern related I though I’d ask here.
PHP isn’t my forte so this may be trivial to do ….
Is it possible using PHP to detect if a web page has been loaded in a frame and if so, reload it without the frame?
I know this can be done client-side using Javascript but the frame-break doesn’t work if Javascript is disabled. It is also possible to bypass this using PHP if you have the right information. Hence I am looking for a server side solution.
Obsolescence is just a lack of imagination. / 36-bits Forever! / #include <disclaimer.h>;
Offline
#2 2006-09-14 02:30:06
- zem
- Developer Emeritus

- From: Melbourne, Australia
- Registered: 2004-04-08
- Posts: 2,579
Re: PHP question
There’s no reliable way to do this using any server-side language. That information simply isn’t available to the server.
You might be able to try something based on the referrer URL, but I wouldn’t count on it being reliable – probably less so than javascript.
Alex
Offline
#3 2006-09-14 12:18:35
- Mary
- Sock Enthusiast
- Registered: 2004-06-27
- Posts: 6,236
Re: PHP question
Yep, JavaScript is the only way to do it, I’m afraid.
One thing you can do: if you get some sucker actually doing this, you can “fix their wagon” by using mod_rewrite. You could redirect referrers from that domain to a “you’ve stolen my site” page, etc. :)
Offline
Pages: 1