Tracking content access

Discussions of secure PHP coding. Security in software is important, so don't be afraid to ask. And when answering: be anal. Nitpick. No security vulnerability is too small.

Moderator: General Moderators

Post Reply
rtlm
Forum Newbie
Posts: 5
Joined: Thu Nov 04, 2004 6:09 am

Tracking content access

Post by rtlm »

Hi all,
I am developing an application which will post links to a website. I want to ensure that visitors to that website are only allowed to click each link to get its content once. Any subsequent clicks should not deliver the content. To track which users have visited the links I am planning to keep a log of IP addresses in a database which can be searched to determine if a particular IP address has already clicked a particular link. My problem is that someone who does not have a static IP address through their ISP can potentially be given a different IP the following day, and then revisit the website and click to get the content again. Is there anything I can do to prevent this from happening? Obviously I have no control over a users IP address so does anyone know of another way to track who has accessed which content?
User avatar
Christopher
Site Administrator
Posts: 13596
Joined: Wed Aug 25, 2004 7:54 pm
Location: New York, NY, US

Re: Tracking content access

Post by Christopher »

Probably a using a cookie would be the easiest method.
(#10850)
User avatar
requinix
Spammer :|
Posts: 6617
Joined: Wed Oct 15, 2008 2:35 am
Location: WA, USA

Re: Tracking content access

Post by requinix »

If you must be absolutely sure that someone does not get the content more than once then I'm sorry but you'll have to loosen your requirements because it's just not possible. You can settle for "make it harder to by checking a combination of variables" or "only allow it once per email address by requiring user registration" but you can't really get any more secure/reliable beyond that.
User avatar
Christopher
Site Administrator
Posts: 13596
Joined: Wed Aug 25, 2004 7:54 pm
Location: New York, NY, US

Re: Tracking content access

Post by Christopher »

I agree. You can make it harder, but not absolutely certain.
(#10850)
rtlm
Forum Newbie
Posts: 5
Joined: Thu Nov 04, 2004 6:09 am

Re: Tracking content access

Post by rtlm »

Thanks for the replies guys. Yeah it looks like I am going to have to just make it as hard as possible to abuse.
Post Reply