Reputation: 1864
How can i catch the current full url including the # sign when it is in it?
My url looks like this: http://example.com/spf#users/admin
When using this code:
$url = "http://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]";
echo $url;
he outputs this only: http://example.com/spf It should also catch the #users/admin behind it
Upvotes: 4
Views: 10570
Reputation: 3986
This isn't possible with "standard" HTTP to get the URL fragment as this value is never sent to the server. You would need following JavaScript on the client side.
Use window.location.hash
in JavaScript and do any operation.
Upvotes: 2
Reputation: 141
Plz Refer Below Link
at Client Side You can use javascript to get hash value with window.location.hash
Upvotes: 4