Hi,
I'm having a problem with a click tracking script that I downloaded. Here is the script (linkcount.php):
$url = str_replace("http://", "", $url);
$url = "http://$url";
$getit = mysql_query("SELECT * FROM poplinks WHERE ID = '$popID'") or die(mysql_error());
if(mysql_num_rows($getit) <= 0){
mysql_query("INSERT INTO poplinks (ID) VALUES ('$popID')") or die(mysql_error());
header ("Location: $url");
}
else{
mysql_query("UPDATE poplinks SET hits = hits + 1 WHERE ID = '$popID'") or die(mysql_error());
header ("Location: $url");
}
}
Here is a sample URL on my site that I want tracked:
http://www.mysite.com/linkcount.php?popID=2231&url=http://www.anothersite.com/news?date=today&articleID=413
The problem I'm having is that the tracking script truncates a URL like the one above at the second ampersand ("&"). That is the URL becomes only:
http://www.anothersite.com/news?date=today
Any ideas on how to fix?