Here you go!
This file captures an image from a web server.
NSURL *url = [ NSURL URLWithString: [ NSString stringWithFormat:@"http://www.somewebsite.com/demo.png"] ]; image = [ [ UIImage alloc ] initWithData: [ NSData dataWithContentsOfURL: url ] ];
or, this one captures a web page ...
NSURL *url = [ NSURL URLWithString:[ NSString stringWithFormat: @"http://www.google.com/search?q=%@", query ] ]; NSURLRequest *request = [ NSURLRequest requestWithURL: url ];
To do this asynchronously, you must check the NSURLConnection .
Jordan
source share