Hi MeteoraCorp,
I got this code from someone on here so I cant take credit for it but thanks to whoever posted it 🙂
Just use this code below
$refer = $HTTP_REFERER;
$refPieces = explode ("/", $refer);
$refer = $refPieces[0] . "//" . $refPieces[2];
echo $refer;