iframes - how do I detect the page of origin?

iframes - how do I detect the page of origin?

am 05.11.2007 17:29:07 von damezumari

I want to put an iframe with src file A (a php file) on page B. If
somebody copies the iframe tag to page C how can I detect that the
request does not come from page B in my code in A?

Regards,

Jan Nordgreen

Re: iframes - how do I detect the page of origin?

am 05.11.2007 18:22:23 von TravisNewbury

On Nov 5, 11:29 am, damezumari wrote:
> I want to put an iframe with src file A (a php file) on page B. If
> somebody copies the iframe tag to page C how can I detect that the
> request does not come from page B in my code in A?

Are A&B owned by you and you want to be able to detect if someone is
trying to launch B from their site (C)?

OR

Do you own all three and you want to know if someone is viewing B from
A or C?

Re: iframes - how do I detect the page of origin?

am 05.11.2007 19:42:40 von damezumari

Case 1. I own A&B, not C.

Re: iframes - how do I detect the page of origin?

am 08.11.2007 21:06:27 von damezumari

I found the answer:

In php $_SERVER['HTTP_REFERER'] returns which page the iframe sits in.