Jump to content

Archived

This topic is now archived and is closed to further replies.

turbocueca

Download hit counter

Recommended Posts

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.

Share this post


Link to post
Share on other sites
[!--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.

Share this post


Link to post
Share on other sites
Thanks for your help.
The DB is created and the file is created but now I don't know how to call the download.

Share this post


Link to post
Share on other sites
[code]<?php
// Add 1 to counter, dont echo anything
header("Location: http://www.site.com/folder/file.extension");
?>[/code]

Orio.

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.