Tutorial :url shortening with unicode conversion for ids?



Question:

I need to make a url shortener for work, so I'm trying to figure out what is going to be the best schema to provide the largest possible number of links in the smallest possible id string.

I had thought of converting unicode characters to bit values to use as ids for a simple database--is such a thing possible? Is there any particular unicode characters that wouldn't get relayed to the server at all? I can access the raw address string as-is to find out exactly what url was entered, but I need to make sure everything that should be there is there. # is one particular example I am unsure of; it being a client-side functionality (anchors), I don't know if it actually gets to the server.

I don't need any randomness to the generated id, I was thinking of just incrementing from the lowest unicode bit value to the highest, basically getting thousands upon thousands of possibilities per-character.

Any advice, help or code samples are appreciated. :)


Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Previous
Next Post »