ntm
ntm

Reputation: 741

How to uniquely identify computers that access a website

I have to uniquely identify computers that access my website. The only solution i found so far is storing an id in a cookie or something similar to identify the browser but my problem is that you could copy the cookies and use them in another browser. is there any way to detect if the cookie is copied or some better way to identify the computer?

Upvotes: 0

Views: 648

Answers (2)

fajarkoe
fajarkoe

Reputation: 1563

There is no reliable way to uniquely identify a browser, because there is nothing that prevents two computers from having the exact same configurations (operation system, browser, location, cookies, flash configuration, etc).

The best that we can do is to gather as many information about the browser as possible. This is well-known approach called browser/device fingerprinting. Although the result is not perfect, it is quite good. Browser's fingerprint typically includes browser name, operating system, fonts, plugins installed, etc. You can test how unique your browser is using https://panopticlick.eff.org/.

Upvotes: 1

hi im gosu
hi im gosu

Reputation: 11

PHP has an array called $_Server which is an associative array with information such as the visitors IP which can be used in conjunction with cookies. JavaScript also offers the "navigator" object which contains information about the browser. You can save that information to a cookie and if it doesn't match with the browser they use on the next visit, it would indicate they are not using the same browser.

Upvotes: 0

Related Questions