تقييم الموضوع :
  • 0 أصوات - بمعدل 0
  • 1
  • 2
  • 3
  • 4
  • 5
جلب السطر الثاني من ملف على النت
#1
رمضان كريم 

كود :
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
           {

           }
اريد جلب السطر الثاني بهذا الكود 
 
وشكرا
الرد }}}
تم الشكر بواسطة:



التنقل السريع :


يقوم بقرائة الموضوع: بالاضافة الى ( 1 ) ضيف كريم