NSURL *url = [NSURL URLWithString:@"http://somewebsite.com/example.txt"];
NSError *error;
NSString *myString = [NSString stringWithContentsOfURL:url encoding:NSUTF8StringEncoding error:&error];
if (error) {
// there was an error, do something with it
} else {
// else, no problem, do something with myString
}