0

Can anyone help with this, if PHP and MySQL enough to count page views/number of downloads precisely? I need to count how many times a wallpaper is being downloaded.

If yes, how can we do that? Thanks a lot for the help.

halfer
  • 19,824
  • 17
  • 99
  • 186
vep temp
  • 249
  • 1
  • 6
  • 18
  • I need to count how many times a wallpaper is being downloaded. – vep temp Sep 24 '13 at 19:45
  • Please post your code for how your wallpaper is being served out. If it is just a right-click / save as situation, then you cannot track *that*. So you will need to track page views. It's not terribly accurate, but is "close enough for horse shoes and hand grenades..." – cssyphus Sep 24 '13 at 19:48
  • what's "enough"? Yes, php and mysql can both do simple "x = x + 1" type math. – Marc B Sep 24 '13 at 19:48
  • 1
    if you dont want to code it yourself there is always google analytics –  Sep 24 '13 at 19:50

2 Answers2

3

There are a number of online tutorials for creating page hit counters. There are several on phpAcademy.org alone.

You might find this one to be most helpful:

https://phpacademy.org/course/unique-hit-counter


And here is a tutorial video for setting up Google Analytics on your site: http://www.youtube.com/watch?v=ZUTNLzzde60

As well as an article for Beginners

cssyphus
  • 37,875
  • 18
  • 96
  • 111
0

mysql is not even needed to solve that problem.

here it is solved by writing a file with the download count

PHP - Count downloads

Community
  • 1
  • 1