PHP invitation, does anyone know how to set this up

06/06/2009 08:44 asianknightkill#1
okay since the past few weeks people been spamming our server randomly nonstop so we decided to take one step further and just to happen one my friend saw SexyCo which requires Invitation code/pass which our server find very interesting but which also non of us know how to set this up, basically asking for a guide/tut. plus this would help other who needs it as well.

I hope everyone who knows about this info please set forward and help us, thank you very much.
06/06/2009 09:02 Zeroxelli#2
Basically, a member of your server clicks "invite" and the server creates a hash of the current time + some random salt string. This hash is added to a database with an expiration time of say, 24 hours to a week. If the user picks it up in the email by then, and the hash matches that which is in the database for that users email; they're allowed to register. Otherwise, it expires and can not be used.
06/06/2009 09:38 asianknightkill#3
so i add this into my register page database? without a guide or picture i'm kinda clueless since it's my first time setting it up, more guidance would be great.