PLEASE SEE ATTACHED FILE...
I'm not even sure if this is possible, but I'll ask anyway.
I have a PHP page with a download link. Behind the scenes, a cookie has been created to update a table of affiliate sellers. I want a way so that once the download link has been clicked, the cookie is deleted. (This is to stop a dishonest/unaware user refreshing the page multiple times in order to clock up multiple "sales"). However, the download itself should, of course, be allowed to proceed, i.e. the process of deleting the cookie should not interfere with the download procedure.
I know I can't delete a cookie after HTML is printed to the client's browser so I was thinking I would have to, perhaps, redirect to a new page, and then delete the cookie in the HTTP headers of that new page.
Can this be done?
In summary, the process is:
1. Download link clicked
2. Download allowed to proceed
3. Whilst download is underway, browser automatically redirects to a new page where cookie is deleted.
Any alternative suggestions to solving this problem are very welcome. If possible, solution should be 100% PHP. Thanks!
1) Complete and fully-functional working program(s) in executable form as well as complete source code of all work done.
2) Exclusive and complete copyrights to all work purchased. (No GPL, 3rd party components, etc. unless all copyright ramifications are explained AND AGREED TO by the buyer on the site).