$refer=$_SERVER['HTTP_REFERER'];

scusate ma non ho potuto farne a meno

(hai scritto coniglio al posto di consiglio )