2
I used the answer to this question to save the IP in a text file: How to save the IP of those who visited my site in a text file?
The thing is, I want to create a button like "enjoy" so that students enjoy those who they think are the best teachers.
But how to prevent a student who has already enjoyed short again?
I figured having a text file for each teacher, inside a folder, with the number of ips they liked would be a solution. In the database could get very extensive or gives in the same?
I know I can use Facebook plug-ins, for example, but what if the colors of my site don’t match anything on the face or if, for example, that system works on an intranet? Finally I want to know the logic to achieve this goal.
Use a database. It makes no sense to use a file for this.
– Beterraba
Anyone can enjoy or only registered users?
– rray
Only those registered.
– I Wanna Know
But so, in the case of an article, anyone could enjoy, registered or not.
– I Wanna Know
IP is not used to control these things, Ips change, if it is on the internet it is usually easy to reset the moden and have a new IP to be able to enjoy again, if it is intranet can happen of more than one person use the same computer then only one could vote.
– Leandro Godoy Rosa
I would use the user’s email then, but then I can only control the ones that are registered. And for the articles? I think that’s what’s best, just enjoy who’s registered, after all only with Facebook who has an account...
– I Wanna Know
But won’t it get big in the database? Professor "A", emails: x, t, y, z... Professor "B", emails: c, d, y, z...
– I Wanna Know
That’s what databases are made for :)
– Beterraba
:3 That’s right! I’ll work on it.
– I Wanna Know
Using IP is not good. And for that I would use the enshrined pair: session variable (like cookies) and an SGDBR.
– Paulo R. D. Lelis