isedeasy Posted October 14, 2009 Share Posted October 14, 2009 Hi guys and gals, Basically I have a database which tracks clicks on my outbound links, I do this by linking to a page like so... /redirect.php?id=1 The page then reads the id and increments the click column in the database before selecting the link and redirecting. I need it to only count the click if its from a unique IP for the link, what would be the best way to do this? I was thinking of having another table with columns "IP" and "link_id", Then I could check the IP against the list of IP's for the current link. If its not there then add it and add the click, otherwise only redirect. I want to find the best method before I start to try and code this so any help is appreciated. Quote Link to comment https://forums.phpfreaks.com/topic/177674-tracking-unique-clicks/ Share on other sites More sharing options...
Daniel0 Posted October 14, 2009 Share Posted October 14, 2009 If it's not crucially important, I would just use a cookie to check if they've clicked it. Sure, it can easily be circumvented, but it will also be much easier on the database. Quote Link to comment https://forums.phpfreaks.com/topic/177674-tracking-unique-clicks/#findComment-936828 Share on other sites More sharing options...
isedeasy Posted October 14, 2009 Author Share Posted October 14, 2009 I had not thought of that, that would be an easier and more efficient way to do it I suppose. The only problem is that if I want to use it for a "unique PPC" it can be circumvented like you said. Quote Link to comment https://forums.phpfreaks.com/topic/177674-tracking-unique-clicks/#findComment-936829 Share on other sites More sharing options...
isedeasy Posted October 15, 2009 Author Share Posted October 15, 2009 Does anyone else have any ideas on how to go about this? Cheers for any input. Quote Link to comment https://forums.phpfreaks.com/topic/177674-tracking-unique-clicks/#findComment-937354 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.