Reputation: 2344
In PHP, there are many ways to differentiate between a guest and another guest. I want a list of the different ways that we can differentiate between them. What I know now are those three ways:
ip address : How to get the client IP address in PHP? Cons: people who are on the same network may get the same IP address.
browser information : How to get exact browser name and version? Cons: If people updated their browsers then they will technically be new guests.
session : how to get session variables using session id Cons: if a user exits the browsers and reenters he will be assigned into a different session.
Integrating those three to differintiate between guests can help cover these loop holes. However, I want to know of other ways that I can use to strengthen my accuracy.
Upvotes: 1
Views: 162
Reputation: 2276
This library will help get you started, it stores to different locations: http://samy.pl/evercookie/
Upvotes: 0
Reputation: 3692
You can create a cookie with a long expiration date (years into the future), and it will remain in the user's browser until such time that they clear their cookies. This circumvents the problems described by all three of your listed options.
Upvotes: 0
Reputation: 1911
Cookies; ip and browser combined; browser language; if you can use javascript you can send to php more data to determinate the guest as: screen resolution, operative system, color depth and other many informations; html5 local storage;
Upvotes: 0
Reputation: 10564
These answers might help. What is the best way to implement "remember me" for a website?
To your list, I'd like to add HTML5 local storage. Even if not supported by all browsers and far less secure than the options you already listed.
Upvotes: 1