title: How to get the full URL of the current page using PHP
body: <p>What is the "less code needed" way to get parameters from an URL query string which is formatted like the following?</p>
  
  <p><strong>My current url</strong> </p>
  
  <pre><code>www.mysite.com/category/subcategory/#myqueryhash
  </code></pre>
  
  <p><strong>I put this code</strong> </p>
  
  <pre><code>$url="http://".$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'];
  </code></pre>
  
  <p>It returns only <code>www.mysite.com/category/subcategory/</code></p>
  
  <p><strong>Output should be :</strong> </p>
  
  <pre><code>www.mysite.com/category/subcategory/#myqueryhash
  </code></pre>