turbocueca Posted May 27, 2006 Share Posted May 27, 2006 How can I make a downlaod hit counter with PHP? I want to know how many downloads the people do on ym website.Thanks before. Quote Link to comment https://forums.phpfreaks.com/topic/10567-download-hit-counter/ Share on other sites More sharing options...
hvle Posted May 27, 2006 Share Posted May 27, 2006 [!--quoteo(post=377527:date=May 27 2006, 07:00 PM:name=turbocueca)--][div class=\'quotetop\']QUOTE(turbocueca @ May 27 2006, 07:00 PM) [snapback]377527[/snapback][/div][div class=\'quotemain\'][!--quotec--]How can I make a downlaod hit counter with PHP? I want to know how many downloads the people do on ym website.Thanks before.[/quote]simpliest way is to have a php file, database, and of course the file to be download.download.php for example, will query database, add 1 to the counter field, then direct using Header to the file to be download.If you need futher explanation on this method, I'd happy to help. Quote Link to comment https://forums.phpfreaks.com/topic/10567-download-hit-counter/#findComment-39415 Share on other sites More sharing options...
turbocueca Posted May 27, 2006 Author Share Posted May 27, 2006 Thanks for your help.The DB is created and the file is created but now I don't know how to call the download. Quote Link to comment https://forums.phpfreaks.com/topic/10567-download-hit-counter/#findComment-39524 Share on other sites More sharing options...
Orio Posted May 28, 2006 Share Posted May 28, 2006 [code]<?php// Add 1 to counter, dont echo anythingheader("Location: http://www.site.com/folder/file.extension");?>[/code]Orio. Quote Link to comment https://forums.phpfreaks.com/topic/10567-download-hit-counter/#findComment-39666 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.