![]() |
|
[.NET] Getting info from site - Printable Version +- Hack Forums (https://hackforums.net) +-- Forum: Tech (https://hackforums.net/forumdisplay.php?fid=444) +--- Forum: Coding (https://hackforums.net/forumdisplay.php?fid=151) +---- Forum: Software Development (https://hackforums.net/forumdisplay.php?fid=118) +---- Thread: [.NET] Getting info from site (/showthread.php?tid=4040623) |
Getting info from site - Waileer - Feb 4, 2014 Hey, I've little problem. I want to read specific data from website. This is how website looks: {"address":"173.194.67.1","country":"US","stateprov":"California","city":"Mountain View","latitude":"37.426","longitude":"-122.071","tz_offset":"-8","tz_name":"America\/Los_Angeles"} I want to get latitude and longitude only. Anyone know how? Thanks, regards. * - Only3 - Feb 4, 2014 MsgBox(Split(Split(Ur String, "latitude"":""")(1), """,")(0)) longitude the same idea * - Engves - Feb 4, 2014 Would help if you actually gave us the URL * - Waileer - Feb 4, 2014 (Feb 4, 2014 11:41 AM)Only3 Wrote: MsgBox(Split(Split(Ur String, "latitude"":""")(1), """,")(0)) longitude the same idea Could you please explain me what those numbers (1) and (0) mean? * - Only3 - Feb 4, 2014 1 is forword and 0 backwork of the string split (array) * - Waileer - Feb 4, 2014 (Feb 4, 2014 11:52 AM)Only3 Wrote: 1 is forword and 0 backwork of the string split (array) Thanks, but I'm getting error on """,")(0)). Identifier expected. * - Nikey646 - Feb 4, 2014 (Feb 4, 2014 11:55 AM)Waileer Wrote: Thanks, but I'm getting error on """,")(0)). Identifier expected. Depending on if you want to add an external library into the mix, you could use JSON.Net, to parse the results and return it as an array. If not, Look up regex patterns for JSON * - Waileer - Feb 4, 2014 (Feb 4, 2014 12:04 PM)Nikey646 Wrote: Depending on if you want to add an external library into the mix, you could use JSON.Net, to parse the results and return it as an array. Aight, I'll try using JSON. Thanks again. |