Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Trip-codes

Name: Anonymous 2007-08-15 9:47 ID:rAGjFXj3

What's a good way to generate trip codes like 4chan uses?  Taking the user IP as an argument.

Name: Anonymous 2010-04-25 11:43

For the record, the way Shiitchan generated the IP-based IDs (as seen in the early posts in this thread) is this:

substr(base64_encode(pack("H*",sha1($_SERVER[REMOTE_ADDR].date("d").SecureSalt()))), 1,8)

Where SecureSalt returns the constant site-wide salt and . is the concatenation operator and not a method call because PHP is beautiful.

The tripcode algorithm is well-known, of course.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List