I’m interested in creating tiny url like links. My idea was to simply store an incrementing identifier for every long url posted and then convert this id to it’s base 36 variant, like the following in PHP: The problem here is that the result is guessable, while it has to be hard to guess what the next url is going
Tag: url-shortener
Base10 to base64 url shortening
I’m coding an url shortener function for a project in which I’m learning php, here is the code (btw I suppose that global here is not a good thing to do :P): The code is taken from this Wikipedia article and adapted to php. My problem is that when I pass a multiple of 64 to the function I get