• 请不要在回答技术问题时复制粘贴 AI 生成的内容
kenneth
V2EX  ›  程序员

链接中的文章ID用什么算法好?

  •  
  •   kenneth · Jan 6, 2013 · 2847 views
    This topic created in 4968 days ago, the information mentioned may be changed or developed.
    1.单纯的数字的话,觉得链接不美观
    http://www.mvmap.com/post/1
    ...
    http://www.mvmap.com/post/100

    2.随机字符串,又显得太无规律
    http://www.mvmap.com/post/random


    希望求一个文章ID的算法:
    纯数字,数字固定长度,不连续,有一定规律,比如时间戳。

    只是希望每个链接的ID都看上去顺眼点。

    SEO角度怎样的链接,收录好也可以交流一下。
    dreampuf
        1
    dreampuf  
       Jan 6, 2013
    翻译标题到英文然后加一个".html"
    zhangxiao
        2
    zhangxiao  
       Jan 6, 2013
    hash+uppercase
    Air_Mu
        3
    Air_Mu  
       Jan 6, 2013
    从0开始
    +10000
    取得上一篇文章数字
    取得当前UNIX时间戳最后一位
    相加
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   5033 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 35ms · UTC 03:51 · PVG 11:51 · LAX 20:51 · JFK 23:51
    ♥ Do have faith in what you're doing.