I have a source of random bits that I would like to massage into integers of various sizes, roughly correlating with the size of popular dice (1-4, 1-6, etc.)
The code I am writing is PHP, so a response in that language is ideal. However, an algorithmic generic response would be totally fine as well.
I would prefer an answer more sophisticated than simply seeding PHP's random() function with chunks of my random data.