FUNCTION URLEncode$(X$) LOCAL STRING A1$ LOCAL INTEGER C,H FOR C=1 TO LEN(X$) H = ASC(MID$(X$, C, 1)) IF H=32 THEN A1$ = A1$ + "+" ELSEIF (H>=48 AND H<=57) OR (H>=65 AND H<=90) OR (H>=97 AND H<=122) THEN A1$ = A1$ + CHR$(H) ELSE A1$ = A1$ + "%" + HEX$(H,2) END IF NEXT URLEncode$ = A1$ END FUNCTION