index.php:
<?php

var_dump(@$_SERVER['HTTP_REFERER']);
Terminal:
➜ tmp curl 'http://0.0.0.0:8090/'
NULL
➜ tmp curl -H "Referer: https://google.com/" "http://0.0.0.0:8090/"
string(19) "https://google.com/"
➜ tmp