Is there a way for a PHP script to know the address of the site that it is used on?
<p>I have a PHP script located on <code>mysite.org</code> and I use it to display images on sub sites of <code>example.com</code> (like <code>example.com/foo/bar</code>, <code>example.com/foo/another-bar</code>). I can only post links to that script there.</p>

<p>Tried <code>$_SERVER['REQUEST_URI']</code>, and <code>$_SERVER['REMOTE_ADDR']</code> but there's no go.</p>

<p>So what i need is some way to know if its used on e.g. example.com/foo/bar.</p>
