This is more of an open ended question as opposed to me actually posting code but here is what I am doing:
I have several actions that give the user points toward rewards on our site. I have created several pixel trackers which use a javascript document.write to fire when the page loads, the image passes the necessary variables my PHP program with does the DB work and by using the header function, returns a GIF image. This all work great and I'm very happy with it but I need to find a solution for stopping the user from simply refreshing the page where they earned the points and keep collecting. I have tried using a PHP cookie which worked but say I navigated somewhere else on the site for example wrote 2 reviews on different products, it doesnt give me points for the 2nd review. I tried detecting refresh in javascript to stop the image from firing if so but no code seems to work right, anybody have any ideas or insight?