Parse a websie to show only information you want

Discussion in 'Jailbreaks and iOS Hacks' started by ibelite, Jul 6, 2007.

  1. ibelite macrumors newbie

    Jul 24, 2004
    I want to take a site that does not offer an API and modify its content for the display of the iPhone. Similar to what greasemonkey does I want to be able to for example only display certain elements of a webpage so it can be formated for the iPhone.

    Perhaps I can use a webserver that preloads the content of a certain site and displays an iPhone formated version of what I want to show to the user.

    Can this be done, if so with what technologies?
  2. jackbenimble4 macrumors member

    Jan 7, 2007
    Providence, RI
    You can 'web scrape' the content using regular expressions and then format it for the iPhone. Most programming languages would be capable of this. I've done it before using PHP and caching the information in a database, and then displaying it in the format I want with each request to my site.

    It's something I might want to try.
  3. ibelite thread starter macrumors newbie

    Jul 24, 2004
    Thanks alot but i want to obtain the source to a page that requires login. Perhaps I can read the post data or sumtin like that?

    In other words, a user goes to a trim down version of a site, logs in, issues query, and my script parses query.

Share This Page