Assuming a URL of:
www.example.com/?val=1#part2
PHP can read the request variables val1 using the GET array.
val1
Is the ha
It is retrievable from Javascript - as window.location.hash. From there you could send it to the server with Ajax for example, or encode it and put it into URLs which can then be passed through to the server-side.
window.location.hash