开发者

IN WEB scripting specially in PHP What could be the possible information we can store on the client?

Sessions and cookies are the basic storing of session but are there any several ways to store an information on client temporary files or maybe on its browser?

Does ses开发者_开发技巧sions and cookies can be permanently stored?

We can track the client routine or patterns in his actions or event when he is using our site but we need an identifier that can temporary(permanently if possible) identified him/her so that we can analyze the pattern of his data and relationships on other data sounds like data mining.

Data can be geolocations,ipaddress(not reliable but still useful),sessions and his patterns in clicking data.

Thank you.


IF your user changes computers (or even browsers) you've lost them. There's no way to identify to different persons from 1 person using two different machines. So you can try identifying machines, not persons.

All methods have problems.

  • IP-adress can change, or can be the same for multiple persons
  • Cookies can be deleted
  • etc

What you can do is start at the bottom, and work your way up. You might miss some users that have changed several things, but the closest you can get to identify a user would be

  • Check if there is a session with a certain id. (cookie?)
  • If there is not, check if the combination ip-adress -- useragent is in your database.

Now the useragent isn't infallible, but otherwise you'll get loads of false positives on that second method: airports, proxys, businesses, etc. Now you'll get some false negatives because it is not completely steady, but the guess is that not all of the people who would change their ip-adress and/or useragent have an invalid session, and vice versa.

It's not perfect, but the closest you can get afaik.


If you really want to be a bastard about it, look at the Evercookie for ideas.

The evercookie has a repo on github: https://github.com/samyk/evercookie

website


You can store data in sessions and in cookies. The difference is that session data stored in your web server while cookie data stored in user's web browser. Also, keep in mind, that you can set cookie's life period to any duration while session's life period is short. You can read more here http://www.thesitewizard.com/php/sessions.shtml

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜