Pulling File From Online with the iPhone

Discussion in 'iOS Programming' started by Hot Sauce79, Apr 16, 2009.

  1. Hot Sauce79 macrumors newbie

    Jul 1, 2008
    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. detz macrumors 65816

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

    Something like that...
  3. Hot Sauce79 thread starter macrumors newbie

    Jul 1, 2008
    Thanks that will be extremely helpful if I need to use it =)

Share This Page