Questo codice mi estrae il referrer:
https://nomesito.it/titolo-lungo#referrer=232132132

<script>
var myHash=location.hash;
var myHash=location.hash.replace('#referrer=','');
</script>

Come faccio a fare ad utilizzare questa variabile in php?

<?php
echo var myHash //giusto per fare un esempio
?>

Grazie 1000