Quantcast
Channel: Comments on: Building Your Own URL Shortener
Viewing all articles
Browse latest Browse all 42

By: Alex Fraundorf

$
0
0

Hi C.W.,
Thanks for the comment and question. Because there is a direct correlation between the database table’s primary ID and the shortened code, you can simply enter a dummy line with an ID of 125000 into your table. The next row entered by the script will be 125001, which should translate to a 4 digit short code, and you will be able to generate a little over six million short codes before it jumps to 5 digits.
This is of course based on my script. If you are using Brian Cray’s version, your solution will probably need some tweaking, but should be similar.
I hope that answers your question. If not please feel free to follow up here or contact me through my website.
Thanks for reading and happy PHPing!


Viewing all articles
Browse latest Browse all 42

Trending Articles