tags:

views:

37

answers:

2

How can I get the value of the URL hash (eg "PARAMETERS" in url "page.html#PARAMETERS") on the server in php?

+4  A: 

You can't, at least not directly. The fragment identifier is never sent to the server.

You could extract it in JS using location.hash and then trigger another HTTP request to the server that includes it as data (e.g. in the query string).

David Dorward
+1  A: 

You can't, unless you got something client-side to explicitly transfer it to you. The fragment part is only handled by the browser.

Joey