abhaygarg12493
abhaygarg12493

Reputation: 1605

How to count number of views of a particular videos in Nodejs just like youtube

I am using Nodejs. Right Now we counting views on the basis of I.P. If requests comes from different IP then we increment count by 1 . For getting the IP we are using req.connection.remoteAddress .

Right now we are in development mode. Is this a good way or we need to something different ?

Upvotes: 0

Views: 1853

Answers (1)

hd.deman
hd.deman

Reputation: 1306

Such a system is too easy to bypass by proxies.

so I recommend to

  1. combine it with fingerprintjs

  2. enable CORS to protect from cheats by services where users payed per action (in your case to watch the videos).

  3. store user identity with something like evercookie

Upvotes: 1

Related Questions