title: PHP how to make Youtube like id's for urls?
body: <p>I'm making a website which people can publish posts. In my database each post has an ID like 1, 2, 3 etc. but I would like to change them, like using a hash like Youtube does.</p>
  
  <p>For example instead of <a href="http://localhost/post/1" rel="nofollow">http://localhost/post/1</a></p>
  
  <p>They would go to <a href="http://localhost/post/hu9NA827z" rel="nofollow">http://localhost/post/hu9NA827z</a></p>
  
  <p>Is there a method like hashing the numbers and decoding it?</p>