Для этого вам понадобится JavaScript:
var hash = window.location.hash;
alert(hash);
Редактировать: Затем вы можете вызвать скрипт php и использовать эту информацию.Пример в jQuery :
$.post('do_something.php', {
// send the parameter 'hash'
hash: hash
}, function(result) {
// do something with the result
// e.g. add it to a div with an id "photos":
$('#photos').html(result);
});
И "do_something.php" может выглядеть так:
$hash = $_POST['hash'];
// do something, e.g. retrieve a photo based on the posted hash and echo it
// this will be in the result variable that's retrieved via Javascript
echo '<img src="photo_from_hash.jpg" alt="" />';