how this code get executed,explanation please
HttpWebRequest request = (HttpWebRequest)WebRequest.Create(seed);
seed = null;
HttpWebResponse response = (HttpWebResponse)request.GetResponse();
Stream stream = response.GetResponseStream();
StreamReader reader = new StreamReader(stream);
str = reader.ReadToEnd();
currloc = 0;
int i=0;
do
{
link = FindURL(str, ref currloc);
MessageBox.Show(link);
WebClient wc = new WebClient();
wc.Proxy = null;
#region
#endregion
wc.DownloadFile(link,i+".html");
if (link != null)
{
seed = string.Copy(link);
}
i++;
}
while (link.Length > 0);
}
while (seed != null);
}
catch(Exception ex)
{
MessageBox.Show(ex.Message);
}
}
Roei BarPosted Sep 30, 2009, 12:00 PM
this code does the following
you are creating a webrequest to a server
then you get the Response.
then if i understand currectly you are running on the response to look for a URL
and then you download the File by that URL