UserID What state the should go to when this page is recieved Some additional data if needed When the code was issued When it expires ( because some things have a longer timeout ) #### Step One ( to speed things up ) run by cron once a night Open database Loop based on previous days load ( about 10k linkcodes ) Make random statecode with no data. End Loop Step Two ( when i generate a page with linkcodes ) Open Database Try to get statecode not in use If avaliable write data to statecode return statecode Else make new statecodes ( about 100 ) write data to statecode return statecode End If