Let's say the current URL is www.example.com/example.php?var=test#1
$_SERVER['QUERY_STRING'];
should return
var=test#1
but it just returns
test
It happens every time a "#" symbol is inserted in the URL.
How can i fix it ? I really need to get the current query string but i CAN'T use $_GET (please don't ask why it would be really too long to explain). I also have no control over the URL and i can't control the url string or encode it before it reach my server.
Edit: same problem with $_SERVER['REQUEST_URI'];