This question already has an answer here:
I have a URL
http://localhost/ifocus/v3/services.php#nav-section2
I want to get hashtags from URL, EX : if the URL contains "#" so capture it via PHP
nav-section2
When i do
echo $_SERVER['REQUEST_URI'];
// Output
/ifocus/v3/services.php
You can not capture this content for that you need js(client side script)
You can't detect the hash parameter of the URL in PHP, you would need to use JavaScript.
You could make a jquery call to php which passes the hash data (
window.location.hash
) to a PHP script as a URL parameter and return TRUE/FALSE though.