Lynx

Discussion in 'PHP' started by wizzard, Nov 6, 2007.

  1. #1
    Hello,

    I have on my server a cronjob that i run every 5 minutes that executes a script on my site that grabs xml data from another server and stores it local in a db.

    But i have a problem lynx (lynx command) is often hanging and the memory usage of the cronjob is 2-3GB.

    Is there a way to execute the script via php. My hosting company called me and told me it should be possible with php and command line interface (cli).

    But for me this is new and i don't know how this works. Can anyone help me ?


    Cheers,
    Kris
     
    wizzard, Nov 6, 2007 IP
  2. garbageman

    garbageman Peon

    Messages:
    29
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    php has a cli.
    $>php -q path/to/yourscript.php
    Don't quote me on this, but that should run it without any output (-q)
    Otherwise let it output, for verification.
    Of course, you will have to rewrite the script in php. If you don't know any php, you can start by using file_get_contents, and then using magpies to parse the xml
     
    garbageman, Nov 6, 2007 IP