4 ms·
Here is a related question. Is creating a hash of letters and numbers instead of just using an ID beneficial in anyway?
by chacha102 17y ago
Here is a related question. Is creating a hash of letters and numbers instead of just using an ID beneficial in anyway?
- chacha102 17y agoBy an ID I simply mean starting at 1 and moving up from there
- lucumo 17y agoIt prevents people from iterating over all URLs in your database. Whether or not you consider that a plus or a minus, is mostly up to you. It also prevents people from easily seeing how many URLs you've shortened.
- nimbix 17y agoIt's about length. If you limit yourself to numbers you only get 10 possible characters instead of 36 if you use letters or 62 if you make them case sensitive.
- andr 17y agoThe only benefit is that by switching from base 10 to base 36 or base 62 (26 lowercase + 26 uppercase + numbers) you are average URL will be shorter. You can usually do this using http://php.net/base_convert http://php.net/base_convert