1. Welcome to the new MacRumors forums. See our announcement and read our FAQ

Pulling File From Online with the iPhone

Discussion in 'iPhone/iPad Programming' started by Hot Sauce79, Apr 16, 2009.

  1. macrumors newbie

    I would like to download a file named 'data.txt' from a designated server that will be determined at a later date. All I want to know is if this is possible. Also if it is possible then what documentation would someone suggest that I look at in order to figure out how to go about doing this.

    If it is not possible then I would like some suggestions on how I would pull information off of a webpage without having the user navigate to the webpage. (the iphone goes to the webpage and pulls the information out of the HTML version of the page without the user actually seeing anything)

    I have done this in Java and I would like to know if i can do this with the iPhone.

    Any help would be greatly appreciated!
  2. macrumors 65816

    NSString *content = [[NSString alloc] initWithContentsOfURL:[NSURL URLWithString:mad:"http://webpage/data.txt"]];

    Something like that...
  3. macrumors newbie

    Thanks that will be extremely helpful if I need to use it =)

Share This Page