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

Typing math
I've added support for typesetting math using LaTeX on the forums.

Example:
Code: [Select]

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

timed header image rotation
I have a joomla site and I was trying to setup a rotating image based on timing NOT just refreshing

PHP & MS Access - Line Break
Hey Guys!

I'm pulling records from an MS Access database and listing them using PHP and I'm r

re calling a function without including file
Hi,
i am new to programming in php, i was just checking the wordpress code and found out in the w

Sharing PHP Sessions Across Domains
I am in the process of writing a script to share a php session across various domains I have.
The

Mail Script Problems
I have created a PHP mail script. I am having a problem though. In $body i am trying to put two va

PEAR Email Attachment w/ $gpg
I have no issues with this code if I take out the attachement section and include the info in the em

PHP using IF to display error
i have a MySQL query and i want to display 1 thing only if the number of affected rows is >=1

animation progress while uploading files?
Hello, i have some website form to upload few files to server. i want to put some gif animation whi

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