Webrequest = webrequest. Create (_ URL );
Httpwebresponse webresponse = (httpwebresponse) webrequest. getresponse ();
Streamreader = new streamreader (webresponse. getresponsestream (), system. Text. encoding. getencoding ("gb2312 "));
String [] citys = _ Citys. Split (New char [] {','}); // obtain the Array
// String deletedata = "Delete [gsegc_ad]... [weather]";
// Iuddata (deletedata );
String Sline = "";
While (Sline! = NULL)
{
Sline = streamreader. Readline ();
For (INT I = 1; I <Citys. length; I ++)
{
If (Sline! = NULL & Sline. startswith ("new array (\" "+ I. tostring () + "\", \ "" + citys [I] + "\""))
{
Console. writeline (I + "" + citys [I]);
String delimstr = ",";
String delim = "\"";
Sline = Sline. substring (Sline. indexof ("(") + 1, Sline. lastindexof (")")-Sline. indexof ("(")-1 );
String [] weatherinfo = Sline. Split (delimstr. tochararray ());
City = weatherinfo [1]. Trim (delim. tochararray (); // city name
Today = weatherinfo [2]. Trim (delim. tochararray ());
Today_weather = weatherinfo [3]. Trim (delim. tochararray ());
Today_ltemp = weatherinfo [4]. Trim (delim. tochararray ());
Today_htemp = weatherinfo [5]. Trim (delim. tochararray ());
Today_pic = weatherinfo [6]. Replace ("\", ""). Trim (delim. tochararray ());