I have a page with this url (www.mysite.com/index.php?op=2&id=3#someancor). I would like to use php function parse_url for split the url but I don't know how to take the full url with ancor. I have tried so:
$base_url = $_SERVER['SERVER_NAME'] . $_SERVER['REQUEST_URI'];
$parsed_url = parse_url($base_url);
echo $parsed_url['path'];
echo $parsed_url['query'];
echo $parsed_url['fragment'];
But my base_url return www.mysite.com/index.php?op=2&id=3. How can I get the full url? Thanks