How i can use the javascript value with php
<blockquote>
  <p><strong>Possible Duplicate:</strong><br>
  <a href="http://stackoverflow.com/questions/1917576/how-to-pass-javascript-variables-to-php">How to pass javascript variables to php</a>  </p>
</blockquote>



<p>If i have this javascript code</p>

<pre><code>&lt;script type="text/javascript"&gt;document.write(top.location);&lt;/script&gt;
</code></pre>

<p>for example value of javascript will be "http://www.xdomain.com/index.php"</p>

<p>Now i need to use the javascript value "http://www.xdomain.com/index.php" with php</p>

<pre><code>&lt;?php

$url = value of javascript   (=http://www.xdomain.com/index.php)

echo ''.$url.'';

?&gt;
</code></pre>

<p>In my case i can't use $_SERVER php variables</p>

<p>How i can do that please ?</p>
