php - User tracking through urls and avoiding manual tampering -


i'd keep track of how many people follow link sent through email.

at moment, i'm thinking of having separate page called through link variable indicate done email.

obviously, can tampered manually through address bar of navigator. approaches use limit this?

1)use different url redirect real one:

http://www.mysite.com/emailoffer -> http://www.mysite.com/specialpage

emailoffer logging, , send location http header pointing real page (specialpage)

http://www.mysite.com/emailoffer this:

/* logging code goes here - mysql stuffs */ header("location: http://www.mysite.com/specialpage"); 

2)add parameter like: http://www.mysite.com/specialpage?email in php, can do: if(array_key_exists('email',$_get)) addtocounter();

3)you log http referer header hits page , run query referers containing "mail" (e.g., mail.google.com, hotmail.com)

to prevent tampering, make parameter seem worth while: http://www.mysite.com/specialpage?secretoffer

good luck! :)

ps - sorry terrible formatting of answer...


Comments

Popular posts from this blog

c# - how to write client side events functions for the combobox items -

exception - Python, pyPdf OCR error: pyPdf.utils.PdfReadError: EOF marker not found -