Public Function LoadFileIntoArray(MinusHeader As String) As String
Dim tmp$
Dim tmpArray() As String
Dim intDynArray() As String
Dim FinalArray() As String
Dim strCommand$
Dim strWebPage$
tmp = MinusHeader
tmpArray = Split(tmp, "<br>")
Dim PrevIndex As Integer
Dim i%, x%
For i = 0 To UBound(tmpArray)
intDynArray = Split(tmpArray(i), "|")
ReDim Preserve FinalArray(UBound(intDynArray) - LBound(intDynArray)) ' + 1)
For x = 0 To UBound(FinalArray)
FinalArray(x) = intDynArray(x - PrevIndex)
Debug.Print FinalArray(x)
strWebPage = "http://localhost/FileList/" & FinalArray(x)
strCommand = "GET " + strWebPage + " HTTP/1.0" + vbCrLf
strCommand = strCommand + "Accept: */*" + vbCrLf
strCommand = strCommand + vbCrLf
Debug.Print strCommand
'send the command to the server
winsock1.SendData strCommand
Next x
'PrevIndex = PrevIndex + 1 'UBound(FinalArray)
Next i
End Function