简体   繁体   中英

PHP Unique Computer ID

Is it possible for php(or javascript in the worst case) to create a unique id for a user that is not cookie or ip dependant. I have seen on myminicity.com that on each city the count only goes up once a day(it has a unique id for everyone i think) and even if I delete my cookies and refresh ip it still seems to detect me as visited already and I want to make this system for me. I have seen lots of people saying its not possible and if it really isn't, whats the best alternative?

EDIT

Now i got the idea that I could use a mix of multiple cookies(with multiple methods of identification), multiple localstorage values(same as the cookies), mysql database ip tracking and flash cookies and if any one of them is found, the user has visited before today.

There are several information a user agent sends to the server. See for example Panopticlick to see how unique your browser is. Another option would be to use Flash cookies that are harder to reject and delete.

You could generate a GUID per computer, assuming that you can figure out some way to store it such that the user can't delete it (good luck).

Most sites that do things like this store the IP address in a database on the server and identify "users" that way. Using javascript you can combine IP address and MAC address to allow for multiple people behind a NAT gateway.

myminicity.com uses your IP range to detect which region you are coming in from... It is called IP base geolocation. There are free and paid services for this. Google "IP based geolocation" ... You can learn more about it at http://en.wikipedia.org/wiki/Geolocation_software

Some of the $_SERVER variables can be used to generate a computer ID. For example:

$id = $_SERVER['HTTP_USER_AGENT'].$_SERVER['LOCAL_ADDR'].$_SERVER['LOCAL_PORT'].$_SERVER['REMOTE_ADDR'];

The values of $_SERVER can be faked, however it will still add an extra layer of security that does not rely on cookies or your IP address.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM