Getting the remote address from a <script> tag
<p>I have a page with a  tag in it pointing to a php script that generates javascript.</p>

<p>In this php script, I verify the remote ip to see if this ip has the right to use the script.</p>

<p>My question is: how do I get the IP from the machine that embeds the  tag?</p>

<p>In $_SERVER, I have REMOTE_ADDR which is MY ip address (the client) and SERVER_ADDR which is the ip of the machine that runs the php script that generates javascript (the server).</p>

<p>But in between those, there's the page that embeds the  tag and I need its server IP address.</p>

<p>Any ideas about how I'm gonna find it?</p>

<p>Thanks</p>
