benroles
07-05-2004, 07:02 PM
Hi All,
I've written a bit of a script that records some visitor information (what the referrer was the very first time they visited plus a visitor id that allows me to track them around the site). This information is stored in cookies. The cookies are fine, and I can read them from my own scripts as follows:
$visitorid = $HTTP_COOKIE_VARS["visitorid"];
$origrefer = $HTTP_COOKIE_VARS["referer"];
I also know that the above works for scripts located in the forum directory. However, I have written some stuff in to global.php that I want to read these cookies. Whilst my script can detect the cookies with if (!isset($_COOKIE['referer'])), the above does not read from them.
Does anyone know why the above does not work in global.php?
Regards Ben.
PS - Apologies for the spelling of referer - too late to change!
I've written a bit of a script that records some visitor information (what the referrer was the very first time they visited plus a visitor id that allows me to track them around the site). This information is stored in cookies. The cookies are fine, and I can read them from my own scripts as follows:
$visitorid = $HTTP_COOKIE_VARS["visitorid"];
$origrefer = $HTTP_COOKIE_VARS["referer"];
I also know that the above works for scripts located in the forum directory. However, I have written some stuff in to global.php that I want to read these cookies. Whilst my script can detect the cookies with if (!isset($_COOKIE['referer'])), the above does not read from them.
Does anyone know why the above does not work in global.php?
Regards Ben.
PS - Apologies for the spelling of referer - too late to change!