资 源 简 介
URL shortening is a technique on the World Wide Web in which a Uniform Resource Locator (URL) may be made substantially shorter in length and still direct to the required page. This is achieved by using an HTTP Redirect on a domain name that is short, which links to the web page that has a long URL.
Now the source may
produce one random string based on the input asscii
encode id to one short string.
decode one short string to id
add checker for short string, e.g. abcd, ab is checker, cd is real short url.
use database to store id and url, e.g. mysql sqlite, etc,
use file to store id and url,
not need to save the short url, the algorithm auto-reverse the short url to id