2010-02-23 44 views

回答

3

對於一個簡單的請求,您可以使用stringWithContentsOfURL

NSURL *url = [NSURL URLWithString:@"http://www.stackoverflow.com"]; 
NSString *content = [NSString stringWithContentsOfURL:url encoding:NSASCIIStringEncoding]; 
+1

來吧, ASCII是sooo 1963! – Kornel 2010-02-23 12:35:34

0

一個非常類似的問題answered here

請閱讀(或重讀)the SO faq。問題應該是

* detailed and specific 
* written clearly and simply 
* of interest to at least one other programmer somewhere 

和:(!也許甚至回答)

請找找看,如果你的問題已經被問