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

/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

Delete all from a table
I can not get the following code to work. If I run the sql statement in the db it will delete all t

Automatic Webpage ??
I have a page www.mysite.com/test.php with a
<form>
<textarea name=&q

user validation always displaying invalid ? please help
Hello,

I have 2 accounts and there is a field in mysql called validated it can be either &quo

Using the $_GET variable to view certain records
Hello,

First let me explain my problem, I have 2 pages the first page pull a list of Guide ti

What are causes of a connection-timeout with fopen()?
Hello! Here is the situation: The server I host my website on just upgraded it's PHP build from 4.4.

How to validate from 2 possible answers
Hi

I hope somebody can help me with what will probably be really simple, I'm pulling my hair

contact form - output to page and email
I have the following in my controller:

$message['name'] = htmlentities(strip_tags(trim($_POST

Detail Expenses Report by Cost Center
I would like to obtain a report out of SAP that shows a list of expenses by cost center that shows t

Word filter problem
Hello,

im trying to make a filter for words inputted in to my website but i want to store the

Php If in MySql query (hiding labels if a field is empty)
Okay, I've been trying to do this for a while, and I'm finally going to ask for help so I can get th

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