I want to get special data from a site but i don't know how.
I need a vb.net source code that help to get this data from web every 5 seconds and split them in a form.
How can I achieve this?
I want to get special data from a site but i don't know how.
I need a vb.net source code that help to get this data from web every 5 seconds and split them in a form.
How can I achieve this?
Copyright © 2021 Jogjafile Inc.
It looks like the data on the webpage is compressed, so if you had been trying to get the data via
WebClient.DownloadString
, orWebClient.DownloadData
,System.Text.Encoding.UTF8.GetString
, then you would not get a readable string. The string might look like thisYou can see that the encoding of the response is compressed with the following
so doing simply
will result in the compressed string. To account for compression, use
System.IO.GZipStream
to decompress.This code is complete. All you do is make a new Form, add a new Label, and paste this
The code above allows either compressed or non-compressed responses. If you know it's always compressed, you can just use this
You should now be getting a readable string