iframes - how do I detect the page of origin?

D

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
 
T

Travis Newbury

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?
 
D

damezumari

I found the answer:

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

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,754
Messages
2,569,528
Members
45,000
Latest member
MurrayKeync

Latest Threads

Top