Hi, I would like to be able to see if a visitor is comming from a partner site and if so then take some further action - i.e. offer a discount.
I did a search to see if there was anything like this and the closet I found was something like this:
Author: Rob (209.75.28.1)
Date: 2001-01-26 14:33:24
If you are using PHP4:
if (in_array($HTTP_REFERER, $partners){
$partner_code = "yes";
}
If you are using <PHP4:
for (reset($parnters); list($key, $value) = current($partners); next($partners)) {
if ($value == $HTTP_REFERER) {
$partner_code = "yes";
}
}
this looks like it may help, but how do I get the info from my database into the array, and what other changes might I have to make?
I am using PHP 4.2.2 I believe (PHP 4.2.? for sure)