16 , 2011

, .


  17 , 2011
PHP
. . . . ..


  25 , 2011
web-.
, ..


  22 , 2011
.
, ..


 

postheadericon / web / web

WEB-.


web-.

As intFile

vDataLines = Split(strUUCodeData, vbLf)

For Each vDataLine In vDataLines

strDataLine = CStr(vDataLine)

intSymbols = Asc(Left$(strDataLine, 1))

strDataLine = Mid$(strDataLine, 2, intSymbols)

For i = 1 To Len(strDataLine) Step 4

strTemp = strTemp + Chr((Asc(Mid(strDataLine, i, 1)) - 32) * 4 + _

(Asc(Mid(strDataLine, i + 1, 1)) - 32) 16)

strTemp = strTemp + Chr((Asc(Mid(strDataLine, i + 1, 1)) Mod 16) * 16 + _

(Asc(Mid(strDataLine, i + 2, 1)) - 32) 4)

strTemp = strTemp + Chr((Asc(Mid(strDataLine, i + 2, 1)) Mod 4) * 64 + _

Asc(Mid(strDataLine, i + 3, 1)) - 32)

Next i

Put intFile, , strTemp

strTemp = ""

Next

Close intFile

End Function

Public Function UUEncodeFile(strFilePath As String) As String

Dim intFile As Integer 'file handler

Dim intTempFile As Integer 'temp file

Dim lFileSize As Long 'size of the file

Dim strFileName As String 'name of the file

Dim strFileData As String 'file data chunk

Dim lEncodedLines As Long 'number of encoded lines

Dim strTempLine As String 'temporary string

Dim i As Long 'loop counter

Dim j As Integer 'loop counter

Dim strResult As String

strFileName = Mid$(strFilePath, InStrRev(strFilePath,

"") + 1)

strResult = "begin 664 " + strFileName + vbLf

lFileSize = FileLen(strFilePath)

lEncodedLines = lFileSize / 45 + 1

strFileData = Space(45)

intFile = FreeFile

Open strFilePath For Binary As intFile

For i = 1 To lEncodedLines

If i = lEncodedLines Then

strFileData = Space(lFileSize Mod 45)

End If

Get intFile, , strFileData

strTempLine = Chr(Len(strFileData) + 32)

If i = lEncodedLines And (Len(strFileData) Mod 3) Then

strFileData = strFileData + Space(3 - (Len(strFileData) Mod 3))

End If

For j = 1 To Len(strFileData) Step 3

strTempLine = strTempLine + Chr(Asc(Mid(strFileData, j, 1)) 4 + 32)

strTempLine = strTempLine + Chr((Asc(Mid(strFileData, j, 1)) Mod 4) * 16 _

+ Asc(Mid(strFileData, j + 1, 1)) 16 + 32)

strTempLine = strTempLine + Chr((Asc(Mid(strFileData,

: 11 , 2010
: 5364

-  18  -

<1 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 |  18  | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45>

|

postheadericon

. .

. ?.

, .