create a program to interact with a website

Discussion in 'Mac Programming' started by BRUUUCE, Nov 25, 2007.

  1. BRUUUCE macrumors member

    Sep 7, 2006
    i only know html/css which does not help me with my objective.

    i'm learning PHP and picking it up fairly quickly but i fear it's not what I need for what i want to do.

    basically, i want a program (no GUI needed) to run through a text game and just input numbers in forms and submit or click links.

    am i going to need to learn a more robust language like java and get familiar with the package?

    i'm not looking for someone to do this for me but head me in the right direction (which computer langagues) on what i want to do.
  2. robbieduncan Moderator emeritus


    Jul 24, 2002
    Language here is probably not the best place to start, rather considering how to achieve this is better.

    From my point of view, having spent about 2 minutes thinking about this is there is probably a hard way and the really hard way :)

    The really hard way is to have your code (perl, C, PHP whatever) request the page from the server, parse it or whatever to work out what to do and then send a valid, http request back to the server with the correct details in the form elements.

    The hard way would be to use Cocoa/Obj-C (or Cocoa/Ruby or whatever) to embed a Webview. Your code can then use Javascript to fill in the form elements and push the buttons. The Webview will deal with all the http stuff and networking for you.
  3. toddburch macrumors 6502a

    Dec 4, 2006
    Katy, Texas
    A perhaps easier way is to use Ruby and the Watir package (pronounced "water") and do this. However, Watir might be Windows only.

  4. BRUUUCE thread starter macrumors member

    Sep 7, 2006
    a quick google search shows it's IE only. My primary computer is ubuntu and my secondary laptop is a powerbook g4. my gf has windows on her mac but i can never have it long enough to code on it..

    thanks for the suggestions though. I appreciate both of your responses.

    looks like i have my work cut out for me, i thought with spambots/crawlers, there would be a lot of documentation on how to make one. Instead of filling out application forms, i would be filling out game forms and just readjust where it's pointing. But that would make life too easy!

Share This Page