mikeyzc
10-13-2003, 07:40 AM
I would like to start a session when a page loads and grab the domain name that the user came to my page from. Is there a function to do this?
|
Click to See Complete Forum and Search --> : referring domain mikeyzc 10-13-2003, 07:40 AM I would like to start a session when a page loads and grab the domain name that the user came to my page from. Is there a function to do this? pyro 10-13-2003, 09:34 AM You could use something like this: <?PHP $refurl = $_SERVER['HTTP_REFERER']; $refurl = explode("/", $refurl); $refurl = $refurl[0]."//".$refurl[2]; session_start(); $_SESSION['referrer'] = $refurl; ?> fyrestrtr 10-13-2003, 09:57 AM One note about referrer -- not every client sends it, and it is easy to spoof. webdeveloper.com
Copyright Internet.com Inc., All Rights Reserved. |