Results 1 to 5 of 5

Thread: cookies and winsock

  1. #1

    Thread Starter
    Member
    Join Date
    Dec 2003
    Posts
    41

    cookies and winsock

    lets say I have:

    VB Code:
    1. Cookie name: sampler
    2. Value: 1105058236
    3. Server: netscape.com
    4. Expire: 2005-12-28
    5.  
    6. Cookie name: CoBrandedFor
    7. Value: AIM
    8. Server: netscape.com
    9. Expire: 2005-12-28

    How would i send that in winsock?

  2. #2
    Addicted Member
    Join Date
    Nov 2004
    Posts
    171

    Re: cookies and winsock

    I would guess in strings. Possibly over binary? I don't know a whole lot about the subject myself.
    Sherminator ~ I'll be back.

  3. #3

    Thread Starter
    Member
    Join Date
    Dec 2003
    Posts
    41

    Re: cookies and winsock

    Like do I have to send the data like "Cookie: cookie data here" ? If so how would i get the name, value, server, and expiration date in there?

  4. #4
    Addicted Member
    Join Date
    Nov 2004
    Posts
    171

    Re: cookies and winsock

    Am I to assume that you are sending it from a server to someone's pc?

    A great link that I was shown today is: www.winsockvb.com
    It has all kinds of examples, but you have to search around a little.
    Sherminator ~ I'll be back.

  5. #5
    Frenzied Member ice_531's Avatar
    Join Date
    Aug 2002
    Location
    Sitting w/ Bob Status: -Next -To- Null- Friend: Philip
    Posts
    1,152

    Re: cookies and winsock

    Quote Originally Posted by DiB
    lets say I have:

    VB Code:
    1. Cookie name: sampler
    2. Value: 1105058236
    3. Server: netscape.com
    4. Expire: 2005-12-28
    5.  
    6. Cookie name: CoBrandedFor
    7. Value: AIM
    8. Server: netscape.com
    9. Expire: 2005-12-28

    How would i send that in winsock?
    I assume you have little winsock experience? If so i'd suggest learning a bit about the basics of client/server applications and the winsock control.... a good url was posted previously winsockvb.com!

    heres a little rough sample of what you might want to do though.

    VB Code:
    1. dim strData as string
    2. strData = "sampler"
    3. Client.senddata "Cookie: " & strData & "/"
    4. DoEvents
    5. strData = "1105058236"
    6. Client.senddata "Value: " & strData & "/"
    7. DoEvents

    You would send the "/" as a delimiter so that you can seperate the data received once on the server side.. you'd use split function to seperate into seperate strings based on "/".
    :::`DISCLAIMER`:::
    Do NOT take anything i have posted to be truthful in any way, shape or form.
    Thank You!

    --------------------------------
    "Never heard about "hiking" poles. I usualy just grab a stick from the nature, and use that as a pole." - NoteMe
    "Finaly I can look as gay as I want..." - NoteMe
    Languages: VB6, BASIC, Java, C#. C++

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