c_shelswell Posted January 7, 2007 Share Posted January 7, 2007 Hi is there a way to log how many times a file has been downloaded with php? I'd like limit someone from downloading a file more than 5 times. I was going to add a field to my database to register how many times it'd been downloaded once that hit 5 i would remove the download link.Not sure if this is possible or not with php if not php does anyone know what i might use.Cheers Link to comment https://forums.phpfreaks.com/topic/33204-log-number-of-downloads/ Share on other sites More sharing options...
onlyican Posted January 7, 2007 Share Posted January 7, 2007 a couple of ways to do itEither ask them to complete a form before showing them the download linkor have the download link go to another pageOn there, run the query to the database, then use header() to start the download Link to comment https://forums.phpfreaks.com/topic/33204-log-number-of-downloads/#findComment-155038 Share on other sites More sharing options...
c_shelswell Posted January 7, 2007 Author Share Posted January 7, 2007 I like the header idea at least that means a user will have definately clicked the link. Cheers Link to comment https://forums.phpfreaks.com/topic/33204-log-number-of-downloads/#findComment-155043 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.