Current URL (from address bar) in a Bookmarklet
<p>I'm building a bookmarklet and I need to get the current URL of the webpage the user is on when they activate the bookmarklet. </p>

<p>I tried using </p>

<pre><code>$current_url = $_SERVER['SERVER_NAME'].$_SERVER['REQUEST_URI'];
</code></pre>

<p>But that will just get me the URL of the server where the JS for the bookmarklet is hosted. Is there anyway of getting the URL straight from the address bar?</p>
