class webClass
{
//method
public List<string> webInfo()
{
string tit2 = "";
List<string> titleList = new List<string>();
string html = new WebClient().DownloadString("http://tabnak.ir/");
int index1 = html.IndexOf("</OBJECT>");
int index2 = html.Length;
string tit1 = html.Substring(index1, index2 - index1);
//
int index3 = 0, index4 = 0, index5 = 0,index6=0,index7=0,index8=0 ;
while ((index3 = tit1.IndexOf("<h3>", index3)) != -1)
{
index5 = 0; index6 = 0; index7 = 0; index8 = 0;
index4 = tit1.IndexOf("</h3", index4);
tit2 = tit1.Substring(index3, index4 - index3);
//
index5 = tit2.IndexOf(">", index5);
tit2 = tit2.Substring(index5 + 1);
//----------------------------------------------------------------------
index6 = tit2.IndexOf("<a class", index6);
index7 = tit2.IndexOf("</a", index7);
tit2 = tit2.Substring(index6, index7 - index6);
index8 = tit2.IndexOf(">", index8);
tit2 = tit2.Substring(index8 + 1);
titleList.Add(tit2);
index3++; index4++; index5++; index6++; index7++; index8++;
}
return titleList;
}