Grabbing referer info
Posted: Wed Jan 28, 2004 4:03 pm
I am using this code to store the referer in a database.
This stores the whole URL in the database. What I want is to store the domain name only. How do I change the above to acheive this.
Code: Select all
if (isset($_SERVER['HTTP_REFERER'])) {
$refer = $_SERVER['HTTP_REFERER'];
}else {
$refer = ' [ -- Direct Hit -- ] ';
}