php script in iframe and domain name


I want to know if there’s any way to know the domain where a script is used in an iframe.


I have website On that website, i use an iframe:

Is there any way for my script.php to know it’s used in

Best regards,


why doun’t u just add a get variable?

Because I need to know what website is using the

I would look into $_SERVER[’’] variables… … les.server

There is a link to all the things you can do with that global. Maybe something there to help you.


I will sure have a look there

If I understand you right, you are (essentially) passing a chunk of code for others to use, but you want to be able to keep an eye on where it’s being used… Is this correct?

I don’t know if this would work for you or not but one simple thing you could do is just create a 1 pixel image, store it on YOUR server. Then have the script call that image some Then in your logs, you would see that site X has made a request for the image. Generally (depending upon your configuration) it would also have the referrer.

You could then right a script to chug through your logs and parse the data that you need.

Sponsor our Newsletter | Privacy Policy | Terms of Service