Jump to content

Some help with, a download counter


Hughesy1986

Recommended Posts

Hi guys!

I am currently making a cms for my portfolio and in the script section I need to record the amount of times that a download has been clicked, how do i go about this? anyone know any good tuts? i dont want someone to do it for me just need pointing in the right direction, also i just want to write it to a txt file.

Many Thanks

Glen
Link to comment
https://forums.phpfreaks.com/topic/36068-some-help-with-a-download-counter/
Share on other sites

Well, yes, there is. And a whole lot of ways to do it aswell.

You could just make a counter script of some sorts.

http://www.yoursite.com/count.php?urlid=4

Then have a small database or text file containing the id's and the url itself. The count script should redirect to the specified URL upon entering an id.

Something like http://php.about.com/od/finishedphp1/qt/track_links.htm

You could.. just count hits when the page you're linking to is loaded, altho that's probably a bad way as the user could just open the page without clicking the link itself hehe. There's alot of ways!

Archived

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

×
×
  • Create New...

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.