Grazie innanzitutto, per recuperare l'URL è corretto usare Codice PHP: $_SERVER['HTTP_REFERER'] ?
$_SERVER['HTTP_REFERER']
Regole del Forum