Results 1 to 7 of 7

Thread: Login With Winsock Java room Prob

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Jan 2009
    Posts
    66

    Login With Winsock Java room Prob

    delet tht post plz i cant delet jus can edit
    Last edited by desi; Jan 8th, 2009 at 01:22 PM.

  2. #2

    Thread Starter
    Lively Member
    Join Date
    Jan 2009
    Posts
    66

    Re: Login With Winsock Java room Prob

    Hey im trying to make a login to a chatrooms it looks a bit easier but when i send packets with winsock it says Java Not Supported in data arrival take a look... the site is: http://www.desimuslimchat.com/

    Chat Server 2
    ChatRoom Name: DesiLobbyChat

    Code:
    Private Sub cmdLogin_Click()
    Winsk.Close
    Winsk.Connect "www.desichat.org", 80
    End Sub
    
    Private Sub Winsk_Connect()
    Dim Login As String
    strData = "nick="& txtUser &"&room=DesiChat&I2.x=41&I2.y=6" & vbCrLf
    Login = "POST /paradesichat.php HTTP/1.1" & vbCrLf
    Login = Login & "Host: www.desichat.org" & vbCrLf
    Login = Login & "User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-GB; rv:1.9.0.5) Gecko/2008120122 Firefox/3.0.5" & vbCrLf
    Login = Login & "Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8" & vbCrLf
    Login = Login & "Accept-Language: en-gb,en;q=0.5" & vbCrLf
    Login = Login & "Accept-Encoding: gzip , deflate" & vbCrLf
    Login = Login & "Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7" & vbCrLf
    Login = Login & "Keep-Alive: 300" & vbCrLf
    Login = Login & "Connection: keep-alive" & vbCrLf
    Login = Login & "Referer: http://www.desimuslimchat.com/" & vbCrLf
    Login = Login & "Content-Type: application/x-www-form-urlencoded" & vbCrLf
    Login = Login & "Content-Length:" & Len(strData) & vbCrLf & vbCrLf
    
    Winsk.SendData Login & strData
    
    
    End Sub
    
    Private Sub Winsk_DataArrival(ByVal bytesTotal As Long)
    Dim Rofl As String
    Winsk.PeekData Rofl
    strData = strData & Rofl
    txtData = Rofl
    
    
    End Sub


    i dont knw wut prob with java
    if someone help
    thanks

  3. #3
    PowerPoster
    Join Date
    Jan 2008
    Posts
    11,074

    Re: Login With Winsock Java room Prob

    Java requires a browser to run. Winsock is not a browser. You will not be able to acompolish your project using Winsock. Use WebBrowser Control instead

    All you are going to get back in the DataArrival is the HTML code from the Website you connect to.

    You can save this data on your hard drive and then use it through a normal browser if that is your intentions. But I think you will have issues
    Last edited by jmsrickland; Jan 8th, 2009 at 02:20 PM.

  4. #4

    Thread Starter
    Lively Member
    Join Date
    Jan 2009
    Posts
    66

    Re: Login With Winsock Java room Prob

    can u expln me with mine code how can i?
    if yes thanks

  5. #5
    PowerPoster dilettante's Avatar
    Join Date
    Feb 2006
    Posts
    24,487

    Re: Login With Winsock Java room Prob

    JavaScript has nothing to do with Java. Entirely different animals.

  6. #6
    PowerPoster
    Join Date
    Jan 2008
    Posts
    11,074

    Re: Login With Winsock Java room Prob

    Quote Originally Posted by dilettante
    JavaScript has nothing to do with Java. Entirely different animals.
    Of course. But your post has nothing to do with the OP's question.

  7. #7

    Thread Starter
    Lively Member
    Join Date
    Jan 2009
    Posts
    66

    Re: Login With Winsock Java room Prob

    i got itz work my slf anyway thanks for reply

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width