28-04-22, 09:55 PM
رمضان كريم
اريد جلب السطر الثاني بهذا الكود
وشكرا
كود :
HttpWebRequest request1 = (HttpWebRequest)WebRequest.Create("btnm.atwebpages.com/test.txt");
request1.Method = "GET";
request1.Accept = "text/html, application/xhtml+xml, *";
request1.UserAgent = "Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.1; Trident/6.0)";
request1.ContentType = "application/x-www-form-urlencoded";
try
{
HttpWebResponse response = (HttpWebResponse)request1.GetResponse();
if (response.StatusCode == System.Net.HttpStatusCode.OK)
{
Stream responseStream = response.GetResponseStream();
TextReader stringReader = new StringReader((new StreamReader(responseStream)).ReadToEnd());
string stri = stringReader.ReadLine();
}
}
catch
{
}
وشكرا