For those who're interested ; here's a script that works.
I've found some good code to do it, at Programmers Heaven!!! (notice the last part of the url?? yes, it's base62-encoded!!! )
I've worked it into a piece of ASP code:
<%
Const kBase62Digits = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"
Function ToBase62(ByVal lInput)
Dim lModulo
Dim sTemp
Do Until lInput = 0
lModulo = lInput Mod 62
sTemp = Mid(kBase62Digits, lModulo + 1, 1) & sTemp
lInput = lInput \ 62
Loop
ToBase62 = sTemp
End Function
Function FromBase62(ByVal sInput)
Dim sR
Dim i,iY,lLen
Dim zMultiplier
zMultiplier = 1
lLen = Len(sInput)
For i = lLen To 1 Step -1
sR = Mid(sInput, i, 1)
iY = InStr(1, kBase62Digits, sR, vbBinaryCompare) - 1
FromBase62 = FromBase62 + iY * zMultiplier
zMultiplier = zMultiplier * 62
Next
End Function
%>
I've incorporated it into the Link Shrinker, and it works as a charm!