Hello...

I am working on a CPC and CPM ads system for a client, and they wanted to use an iframe displayed on another persons site in order to actually serve the ads. So, i have developed the whole script, and it is working when used by getting the $_SERVER but what i really need is for the php script to be able to get the host name of the server that it is being iframed on.. (I hope that made some sense)

So. My question is, is there any way to find the URL of a remote site where your PHP script is being iframed?

Thank you for any answers!!
-Brett

You could try using $_SERVER['HTTP_REFERER'] but I'm not 100% sure on that.

Ok.. I will try that out.. If it works i'll let you know.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.