1) Invio la Stringa per la Query a PHP, e fin qui' tutto OK!
2) Mi ritorna uno Stream di dati e cioe' un elenco di nomi di "Agenti" (vedi codice...)
3) Dovrei potere esplodere questa stringa di ritorno in tante sottostringhe contenenti un nome ciascuna, per poi popolarci la mia ListView


se fossi in PHP "esploderei la stringa dato un carattere da decidere", in un Array di dati, per poi fare un ciclo "foreach" Popolando la "ListView".


ma in VB.NET non so come si fa per esplodere una stringa .........



codice:
        Dim lipa As IPHostEntry = Dns.Resolve("localhost")
        Dim addr As IPAddress() = lipa.AddressList
        Dim lep As New IPEndPoint(lipa.AddressList(0), 80)
        Dim s As New Socket(lep.Address.AddressFamily, SocketType.Stream, ProtocolType.Tcp)
        Try
            s.Connect(lep)
        Catch e As Exception
            MsgBox(("Exception Thrown: " + e.ToString()))
        End Try

        Dim br As String = vbCrLf
        Dim protocol As String = "HTTP/1.0"
        Dim target As String = "/phpinfo.php"

        Dim body As String = "sql=SELECT Nome_Agente FROM Agenti"

        Dim headers As String = "POST " & target & " " & protocol & br
        headers += "Content-Type: application/x-www-form-urlencoded" & br
        headers += "Content-Length: " & body.Length.ToString & br & br

        Dim msg As Byte() = Encoding.ASCII.GetBytes(headers & body)
        Dim i As Integer = s.Send(msg, 0, msg.Length, SocketFlags.None)


        Dim RecvBytes(1024) As Byte
        Dim strRetPage As String = Nothing
        Dim ASCII As Encoding = Encoding.ASCII
        Dim bytes As Int32 = s.Receive(RecvBytes, RecvBytes.Length, 0)


        'OUTPUT
        MsgBox(Encoding.ASCII.GetString(RecvBytes))
        s.Shutdown(SocketShutdown.Both)
        s.Close()