text: 0
  hello friend
  i have a text file name url.txt contain lots of url, one url in a line.
  now i want to get the content of each an every page which are open on the basis of those urls,
  here is my code:
  using System; using System.IO; using System.Net; using System.Text; class WebFetch { static void Main(string[] args) { // used to build entire input StringBuilder sb = new StringBuilder(); // used on each read operation byte[] buf = new byte[8192]; int counter = 0; string line; // Read the file and display it line by line. System.IO.StreamReader file = new System.IO.StreamReader("c:/wamp/www/isbn/url.txt"); while ((line = file.ReadLine()) != null) { // prepare the web page we will be asking for HttpWebRequest request = (HttpWebRequest) WebRequest.Create(line); //? // print out page source Console.WriteLine(sb.ToString()); } file.Close(); } }
  its working and show the content of the file in console but the records are repeated.
  that mean content of 1st then 1st and 2nd then 1st 2nd 3rd.
  but i want the records are unique.
  for example 5 url 5 records.
  this code give me 15.
  plz help me what is the problem in that code??
  that is the content of url.txt: