URL Encoder for Visual Basic 6
Did you ever consider how URL redirection services like TinyURL and Bit.ly encode your URL? A few years ago I was asked to frame up an encoder that could be translated to Classic ASP for use in just such as service.
As you might guess every URL submitted to such a service is stored in a MySQL, SQL Server, Postgres or even SQLite database. Each URL is stored in it’s own row in the database and is assigned a unique ID. If the URL is not assigned a specific short code by the owner then the service computes a short code based upon the row ID.
When a request comes in the short code is extracted from the request URL. The code is either a user specified short code or it is the encoded row ID and it is used to find the real URL being requested by the client browser.
EncodeURL_VB6 is small VB project contains a class that can encode or decode URL codes in base 10, base 36, and base62. It also comes with a form for testing. You can find the source in the downloads section. Enjoy!
~A













