Making a short URL similar to TinyURL.com

前端 未结 5 1406
攒了一身酷
攒了一身酷 2020-12-14 04:39

I\'m building a new web app that has a requirement to generate an internal short URL to be used in the future for users to easily get back to a specific page which has a ver

5条回答
  •  余生分开走
    2020-12-14 05:27

    Please, check out this good explanation on subject: Random TinyURL Browser (Updated) .

    Important part:

    As we have established, there are 62,193,780 possible values for TinyURL's. TinyURL's are generated by a Base 36 hash (36 indicating the number of characters a-z and 0-9, the array of possible values out of which a TinyURL can be constructed), autoincremented by MySQL with an initial value count of zero.

    BTW, another SO similar question, through a mathematical view : Creating your own Tinyurl style uid. And here some .NET source code: Base 36 type for .NET (C#)

提交回复
热议问题