Forum Moderators: coopster
if so then it is only a matter of adding it, something like
$_SESSION['referer'] = $_SERVER['HTTP_REFERER'];
if you aren't using sessions then I would probably just put it into a cookie, take a look at
set_cookie [php.net]
Make sure you only set the session variable for the referrer once - if it hasn't been set before, or you'll overwrite the external referer with internal ones. (from your own web site)
If that doesn't help, pls let me know which cms you use.
All the music seems to play in a file names index.php in the mambo root directory.
After the <?php - stuff I opened a session:
session_start();
And at the very end of this file I added this:
if (!isset ($_SESSION['referer'])) {
$_SESSION['referer'] = $_SERVER['HTTP_REFERER'];
echo "new referer logged: " . $_SESSION['referer'];
}
else {
echo "Referer has been set before this: " . $_SESSION['referer'];
}
Seems to work as intended:
1st call of a page:
new referer logged: [testserver...]
2nd and thereafter:
Referer has been set before this: [testserver...]
So, this seems to be a possibility. But simply opening a session might bring problems - maybe mambo does that on itself somewhere down in the code and you break it this way. But it may be a starting point foor you.
Good luck, nerd.
session_destroy() destroys all of the data associated with the current session. It does not unset any of the global variables associated with the session, or unset the session cookie.In order to kill the session altogether, like to log the user out, the session id must also be unset. If a cookie is used to propagate the session id (default behavior), then the session cookie must be deleted. setcookie() may be used for that.