|
-
Feb 15th, 2009, 06:51 AM
#1
Thread Starter
Hyperactive Member
[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.
-
Feb 15th, 2009, 07:01 AM
#2
Re: Winsock vs Inet question (tricky)
"crypted out"? how do you mean?
-
Feb 15th, 2009, 07:07 AM
#3
Thread Starter
Hyperactive Member
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.
-
Feb 15th, 2009, 07:49 AM
#4
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
-
Feb 15th, 2009, 08:45 AM
#5
Thread Starter
Hyperactive Member
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.
-
Feb 15th, 2009, 09:16 AM
#6
Thread Starter
Hyperactive Member
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|