Ok so alot of people store IPs in their database, ive always viewed this as a bad practice. For a friend I coded this, it creates PSUDEO ip addresses that arent the users real IP but are unique to their normal IP yet dont identify them. This helps keep your users anonomous and also as a byproduct keeps you within the german privacy laws (if applicable)

PHP Code: 
function hash_ip($ip){
return 
long2ip(crc32($ip.ip2long($ip)));
}
echo 
hash_ip($_SERVER['REMOTE_ADDR']); 
Enjoy. If you need it more secure you can add more hashing alogorythms and maybe add the user agent into it (as I did for my friend).
SplitIce Reviewed by SplitIce on . How to create a unique identifier for your users without using an IP Ok so alot of people store IPs in their database, ive always viewed this as a bad practice. For a friend I coded this, it creates PSUDEO ip addresses that arent the users real IP but are unique to their normal IP yet dont identify them. This helps keep your users anonomous and also as a byproduct keeps you within the german privacy laws (if applicable) function hash_ip($ip){ return long2ip(crc32($ip.ip2long($ip))); } echo hash_ip($_SERVER); Enjoy. If you need it more secure you can Rating: 5