title: PHP URL decode GET
body: <p>I have been using URL decode on encoded URL variables from $_get.</p>
  
  <p>The current problem I am facing is I have a URL encoded like this:
  <code>blah.php?url=http%3A%2F%2Fm.youtube.com%2F#/watch?feature=player_embedded&amp;v=zd7c5tQCs1I&amp;desktop_uri=%2Fwatch%3Fv%3Dzd7c5tQCs1I%26feature%3Dplayer_embedded</code></p>
  
  <p>I'm not sure what kind of encoding this is, can someone help me? When I use just "urldecode" on this it just returns <code>m.youtube.com</code></p>
  
  <p>Edit: My problem is not that url decode isn't working, it works if I manually enter this encoded URL and use urldecode(), but when this encoded url is in the actual pages url and I use the _GET function then I try to decode it it stripes off everything after the "#" in the URL.</p>
  
  <p><code>&lt;?php print urldecode($_GET["url"]);?&gt;</code></p>
  
  <p>It returns </p>
  
  <p><code>"http://m.youtube.com/"</code></p>
  
  <p>instead of </p>
  
  <p><code>"http://m.youtube.com/#/watch?feature=player_embedded&amp;v=zd7c5tQCs1I&amp;desktop_uri=/watch?v=zd7c5tQCs1I&amp;feature=player_embedded"</code></p>
  
  <p>I think the issue is that the pound sign is not encoded, if I refresh the page it strips away the pound sing and everything after it, so how do I get around this? Can I still retrieve the info from "GET" even though there is a pound sign? (#)</p>