Well not an error as such. My site isn't logging the incoming hits from my refferrals properly, and as I used someone else package to install my site (I know fuck all about PHP) I don't quite know whats wrong lol
This is the section from my index file that is supposed to log whether a user came from a referrals link or not.
// See if this visitor was referred by a link on your list
if ($linktrading==1){
if(!isset($_SESSION['referral'])) {
$referral = $_SERVER['HTTP_REFERER'];
$array=parse_url($referral);
$referral1 = $array['host'];
$referral2 = str_replace("www.", "", $referral1);
$referral3 = "http://".trim($referral2);
$referral4 = "http://www.".$referral2;
// If referrer is in database, then add a hit!
$add_hit = mysql_query("update links
set totalin=totalin+1,
dayin=dayin+1
where url like '$referral1%' || url like '$referral3%' || url like '$referral4%'");
$_SESSION['referral'] = 1;
}
}
// End link check
The script is PHP Link dropper if anyone is interested, thanks
This is the section from my index file that is supposed to log whether a user came from a referrals link or not.
// See if this visitor was referred by a link on your list
if ($linktrading==1){
if(!isset($_SESSION['referral'])) {
$referral = $_SERVER['HTTP_REFERER'];
$array=parse_url($referral);
$referral1 = $array['host'];
$referral2 = str_replace("www.", "", $referral1);
$referral3 = "http://".trim($referral2);
$referral4 = "http://www.".$referral2;
// If referrer is in database, then add a hit!
$add_hit = mysql_query("update links
set totalin=totalin+1,
dayin=dayin+1
where url like '$referral1%' || url like '$referral3%' || url like '$referral4%'");
$_SESSION['referral'] = 1;
}
}
// End link check
The script is PHP Link dropper if anyone is interested, thanks


Comment