hi
i was wondering if anyone can help me with my code what im trying to do is get this code to login to the steamcommunity website but am having a problem with the login packet any ideas on this would be great thanks...


Form Code:
Private Sub Command1_Click()
Socket.Connect "steamcommunityDOTcom", "80"
End Sub

Private Sub Form_Unload(Cancel As Integer)
End
End Sub

Private Sub Socket_Connect()
SteamLogin Text1.Text, Text2.Text, Socket
End Sub

Private Sub Socket_DataArrival(ByVal bytesTotal As Long)

Dim THEDATA As String * 18

Socket.GetData THEDATA

If THEDATA = "HTTP/1.1 302 Found" Then
MsgBox "Correct Password!", vbInformation

Else
MsgBox "Wrong Password!", vbCritical
End If

Socket.Close
End Sub

Module Code:
Public Function SteamLogin(Username As String, Password As String, Winsck As Winsock)

Dim LOGINPACKET As String, FINALLEN As String

FINALLEN = 36 + Len(Username) + Len(Password)

LOGINPACKET = "POST /loginForm HTTP/1.1" & vbCrLf
LOGINPACKET = LOGINPACKET + "Host: " & Winsck.RemoteHost & vbCrLf
LOGINPACKET = LOGINPACKET + "User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.7.8) Gecko/20050511 Firefox/1.0.4" & vbCrLf
LOGINPACKET = LOGINPACKET + "Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5" & vbCrLf
LOGINPACKET = LOGINPACKET + "Accept-Language: en-gb,en;q=0.5" & vbCrLf
LOGINPACKET = LOGINPACKET + "Accept -Encoding: gzip , deflate" & vbCrLf
LOGINPACKET = LOGINPACKET + "Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7" & vbCrLf
LOGINPACKET = LOGINPACKET + "Keep-Alive: 300" & vbCrLf
LOGINPACKET = LOGINPACKET + "Connection: keep -alive" & vbCrLf
LOGINPACKET = LOGINPACKET + "Referer: http://wwwDOTgoogleDOTcom" & vbCrLf
LOGINPACKET = LOGINPACKET + "Content-Type: application/x-www-form-urlencoded" & vbCrLf
LOGINPACKET = LOGINPACKET + "Content-Length: " & FINALLEN & vbCrLf & vbCrLf

LOGINPACKET = LOGINPACKET + "steamAccountName=" & Username & "&steamPassword=" & Password & "&userlogin=Log+In"

Winsck.SendData LOGINPACKET

End Function