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 :cry:
Printable View
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 :cry:
"crypted out"? how do you mean?
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
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
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
Yeap man! It worked withou sending the ACCEPT ENCODING!
Thanks you solved my problems so far!
Rating you!
Thanks!