Results 1 to 6 of 6

Thread: [RESOLVED] Winsock vs Inet question (tricky)

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Aug 2008
    Posts
    353

    Resolved [RESOLVED] Winsock vs Inet question (tricky)

    Hi guys,

    Well is there a way to get the data in winsock as the Inet.getchunk does it.

    I mean inet.getchunk gets all the data but winsock gets data crypted out
    Thanks for helping me out.

  2. #2
    Frenzied Member Jim Davis's Avatar
    Join Date
    Mar 2001
    Location
    Mars base one Username: Jim Davis Password: yCrm33
    Posts
    1,284

    Re: Winsock vs Inet question (tricky)

    "crypted out"? how do you mean?

  3. #3

    Thread Starter
    Hyperactive Member
    Join Date
    Aug 2008
    Posts
    353

    Re: Winsock vs Inet question (tricky)

    well when i get the data i get it all crypted like squares and staff...maybe becasue of gzip, dunno. (when using POST method)
    But when i use inet.getchunk i get all the webpage source...hmm
    Thanks for helping me out.

  4. #4
    Frenzied Member Jim Davis's Avatar
    Join Date
    Mar 2001
    Location
    Mars base one Username: Jim Davis Password: yCrm33
    Posts
    1,284

    Re: Winsock vs Inet question (tricky)

    Most of the web servers are listening for instructions in the GET headers. For example, if you are including the "Accept-Encoding" instruction, in your GET header, the server will send out the gzip'ed content. Otherwise, the output should be plain text.

    'Winsock1.SendData ("Accept-Encoding: gzip" + vbCrLf) <- dont send this line.

    Unfortunately, there are also some servers that are set up by default, to send out gzip'ed content always, it doesnt matter you set the accept encoding or not.

    I have done an experiment about how to "decompress" the gziped content from any webserver, by using the "vbzlib1.dll". Most of the cases it works nice, and decompress the gziped content. But sometimes, well.. it doesnt, and dont ask me the reason, i didnt found it..

    I have used the czlib class, by James Johnston, but with some bit modifications. Here is the link you can get the original class.
    http://www.Planet-Source-Code.com/vb...64920&lngWId=1

    And, here is the modified zlib.dll, that this class is uses.
    http://www.techknowpro.com/vb/vbzlib/vbzlib1.dll

  5. #5

    Thread Starter
    Hyperactive Member
    Join Date
    Aug 2008
    Posts
    353

    Re: Winsock vs Inet question (tricky)

    Well i tried to copy the text that i recieved from the server, into the app you gave me...unfortunately no luck...

    I will try now to eliminate the .. Accept-Encoding
    Thanks for helping me out.

  6. #6

    Thread Starter
    Hyperactive Member
    Join Date
    Aug 2008
    Posts
    353

    Re: Winsock vs Inet question (tricky)

    Yeap man! It worked withou sending the ACCEPT ENCODING!

    Thanks you solved my problems so far!

    Rating you!

    Thanks!
    Thanks for helping me out.

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