Video counter - Forum

Forum Navigation
You need to log in to create posts and topics.

Video counter

Hello Luis ...

As you know, I am building a video application for the videos I make.

I would like to know if there is a way to count the number of times each video is watched.

I would like the calculated number to be kept on the "host" server so that counting continues each time a new user plays the video again.

Note: I have many videos in this application.

Thank you!

Hi @rocote. Anytime a user plays a video load the counter from the server, add 1 and save it again to the server.
You should have a different counter for each video or save all the data in the same file in JSON format or your own format (comma separated for instance). It's possible to use a database too. Take a look at this video tutorial to learn how to read and write files to your server:

Regards.

Vadim and CDY@44 have reacted to this post.
VadimCDY@44

Thanks Luis!