Could anyone recommend a preferred algorithm to use for URL shortening? I\'m coding using PHP. Initially I thought about writing something that would start at a character su
I adopted a "light" solution. On user request I generate a unique identifier (checking for conflicts in db) with this python snipplet:
url_hash = base64.b64encode(os.urandom(int(math.ceil(0.75*7))))[:6]
and store it in db.