Forum Moderators: phranque
Or, easier possibly, password protect a directory containing the self same .zip file, so that access is only given once.
Is there a script out there that would allow this sort of thing? Something simple, perl maybe or php, but nothing I have to set up database for.
Thanks in advance...
Then if you user is a member, you can just increment the data in the user database. If it is a guest, it is a bit more complicated indeed (although you can create a database which store user agent and IP of your guest)...
I'm not so worried about a user downloading the file more than once, but of e-mailing his/her friends and them downloading it multiple times between them.
so a one life password would be the simplest way to go.
or am I being simplistic?
I'm no php expert by any stretch, but I think the cookie thing is as simple as:-
if ($_COOKIE['downloadedzip'] == '')
{
setcookie('downloadedzip', 1);
//Allow the download
}
else
{
//Don't allow the download
}
But you might be better off in the php forum to get a better response on the actual code, and perhaps some ideas of securing it further.
TJ