DragonFire-N[R] Posted July 22, 2008 Share Posted July 22, 2008 Are there PHP functions available that allow me to compress multiple files into an archive? I have a site that gives users a lot of files to download, and it would be easier if the users could select which files to include in an archive rather than downloading each file individually, so I'm wondering how I could do that. Also, secondly, on IPB there is a feature that keeps track of topic views and profile views, but it doesn't update immediately, instead it updates every hour to reduce server activity. I need to know how to do this for my site to keep track of downloads for each file because the files are downloaded frequently and it may be too much stress on the server to keep the count up-to-date constantly. Thank you all in advance Link to comment https://forums.phpfreaks.com/topic/115947-couple-of-questions/ Share on other sites More sharing options...
trq Posted July 22, 2008 Share Posted July 22, 2008 1. Compression and Archive Extensions 2. Simply add an entry to a database each time a file is downloaded. Link to comment https://forums.phpfreaks.com/topic/115947-couple-of-questions/#findComment-596146 Share on other sites More sharing options...
DragonFire-N[R] Posted July 23, 2008 Author Share Posted July 23, 2008 1.) It seems most of those libraries require some sort of extension, and unfortunately there is no way to install any additional PHP functions on a shared hosting package . It seems I can use GZIP, so could you perhaps provide a simple example on how I would add files to an archive? 2.) That doesn't quite help me though. I'm looking to reduce server lag by having the records update hourly as opposed to instantly, like the IPB features which update topic/profile views hourly to reduce memory allocation. Currently I just run an update query every time a user downloads a file, which isn't very efficient. Link to comment https://forums.phpfreaks.com/topic/115947-couple-of-questions/#findComment-597044 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.