calling a wget to run in background?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • LRW

    #1

    calling a wget to run in background?

    In a PHP script I have the following two lines:

    $thumbproc = escapeshellcmd( "wget -q -T 2000 http://(A
    URL)/pa-thumbs/createthumbs.ph p?dir=".$order_ po." &");
    exec("$thumbpro c 2>&1", $output);

    Works perfectly...exc ept, it always waits until it finished with the
    wget before it continues in the script.
    Normally this wouldn't be a problem, except this wget is calling a
    page that's doing some image manipulation that can take up to two
    minutes to complete.

    In the meantime I've added an echo at the top of the page saying
    "please wait..." but there's got to be a way to have it send the wget
    command in the background.

    And I read the wget MAN, and that's what the -q and the & were for, I
    thought.

    What am I missing?

    Thanks!
  • Alex

    #2
    Re: calling a wget to run in background?

    You're missing the PHP manual.

    http://www.php.net/ look up program execution functions

    "LRW" <deja@celticbea r.com> wrote in message
    news:3a1d1813.0 407061031.31b30 a87@posting.goo gle.com...[color=blue]
    > In a PHP script I have the following two lines:
    >
    > $thumbproc = escapeshellcmd( "wget -q -T 2000 http://(A
    > URL)/pa-thumbs/createthumbs.ph p?dir=".$order_ po." &");
    > exec("$thumbpro c 2>&1", $output);
    >
    > Works perfectly...exc ept, it always waits until it finished with the
    > wget before it continues in the script.
    > Normally this wouldn't be a problem, except this wget is calling a
    > page that's doing some image manipulation that can take up to two
    > minutes to complete.
    >
    > In the meantime I've added an echo at the top of the page saying
    > "please wait..." but there's got to be a way to have it send the wget
    > command in the background.
    >
    > And I read the wget MAN, and that's what the -q and the & were for, I
    > thought.
    >
    > What am I missing?
    >
    > Thanks![/color]


    Comment

    Working...