title: Read a .txt file from the web - Objective-C
body: <p>In my iPhone app, how can I download a .txt file from the web, and then get it's contents into an NSString. For instance, say the text file was located at <a href="http://www.somewebsite.com/textfile.txt" rel="nofollow">http://www.somewebsite.com/textfile.txt</a></p>
  
  <p>Then what I want to do is:</p>
  
  <pre><code>if(user has internet connection)
     NSString *textFile = download text file from http://www.somewebsite.com/textfile.txt
  else
    NSLog(@"user has no internet");
  </code></pre>
  
  <p>Can someone show me code to do this?</p>