Tracking Unique Clicks


Posted on 16th Feb 2014 07:03 pm by admin

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...

Did you know?Explore Trending and Topic pages for more stories like this.
/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.
No comments posted yet

Your Answer:

Login to answer
91 Like 24 Dislike
Previous forums Next forums
Other forums

I got my hosting suspended XD
So I saw this challenge a day or so ago

http://www.programming-challenges.com/pg.php?page=dow

Count on multidimensional array
Hi, i got an array as below:

Array
(
=> Array
(

Stats of viewers
Hello. I have a website in php and people can login. I want to make an admin control panel where u c

Extract text from string
Hi folks,

I have a string that looks like this:

aaaaaaaaaa:
bbbbbbbbbb (ccccccccc)

Insert Failing.
Hey,
I am making a Sign up page for a website, but the insert query into the Database does not se

captcha error
I have been trying to implement a captcha in php...

here is the code..
Code: (php) [Select

Anti Spam Code
Ok where do i start? Probably by telling you I have very little working knowledge of PHP and that I

mysql_real_escape_string
Let me preface this that I am very much a PHP noob, but I have some SQL training (not necessarily My

Running External Scripts
I am very new to PHP and am not even sure what I'm asking is possible. I have just installed mediaW

MySQL Does not UPDATE- SQLString Problem
vb Syntax (Toggle Plain Text) 1. SQL = "UPDATE sampletable SET column1 = 'C1sample1'"

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash