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

Random date selection
i want to select random date with time(hour+minutes+sec) where date is specified(10/22/2009) and tim

mysql UNION | warning mysql_fetch_array !!
Code: <?php
$i = 0;
$query1="SELECT * FROM `products` WHERE `div

Email logic not working
I would like to send an email using the php email() function then if it does execute i.e sends i wou

form help
this doesn't work. i want the form action to go the location.href of the submit button chosen.. how

Quick Question about echo value
Hey guys, I'm trying to get something to show differently in one of my scripts. I'm trying to make

Unable to retreve the values from Mysql Query
Hi,

Here is the php code that I have, Query is running properly in phpmyadmin and is resu

Multidimensional array problems in $_POST
I'm having trouble with a three-dimensional $_POST array. It starts as a two-dimensional array on th

bind error during socket programming
i am kinda new to socket programming. wrote the below code for a server. but getting the bind error

help with insert
Hi there,

I am trying to insert some data into a database, but for some reason, it is not ins

radio button reamains checked
Hello i'm trying to keep the state off my radio buttons so it shows which ones where clicked after t

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