Home Upgrade Search Memberlist Extras Hacker Tools Award Goals Help Wiki Contact

.NET 

Getting info from site

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.
MsgBox(Split(Split(Ur String, "latitude"":""")(1), """,")(0)) longitude the same idea
Would help if you actually gave us the URL
(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?
1 is forword and 0 backwork of the string split (array)
(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.
(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
(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.

If not, Look up regex patterns for JSON

Aight, I'll try using JSON. Thanks again.


Possibly Related Threads...
Thread / Author Replies Views Last Post
[.NET] by shanMay 4, 2013 07:14 AM 8 549 May 4, 2013 07:14 AM
Last Post: Mohatu
[.NET] by IllBeBackSoonAug 22, 2011 07:49 PM 12 182 Aug 22, 2011 07:49 PM
Last Post: McNugget Rage
[C#] by The-Black-RavenOct 27, 2009 10:41 AM 0 123 Oct 27, 2009 10:41 AM
Last Post: The-Black-Raven