Get CityName from Geobytes

pigmonster

New Member
I am using this code to get information about my ip address\[code\]protected void Page_Load(object sender, EventArgs e){ WebRequest request = WebRequest.Create("http://gd.geobytes.com/gd?after=-1&variables=GeobytesCountry,GeobytesCity,GeobytesRegion,GeobytesLatitude,GeobytesLongitude"); HttpWebResponse response = (HttpWebResponse)request.GetResponse(); Stream dataStream = response.GetResponseStream(); StreamReader reader = new StreamReader(dataStream); var responseFromServer = reader.ReadToEnd(); Label1.Text = responseFromServer.ToString(); reader.Close(); dataStream.Close(); response.Close();}\[/code\]It returns to \[code\]label1\[/code\]\[code\]var sGeobytesLocationCode="PKPBRAWA";var sGeobytesIsLocationMatch=false;var sGeobytesCountry="Pakistan";var sGeobytesRegion="Punjab";var sGeobytesCity="Rawalpindi";var sGeobytesLatitude="33.6000";var sGeobytesLongitude="73.0670";\[/code\]How do I get only the city name from this. As in my case Rawalpindi
 
Back
Top