Using exec() and wget = script halt?

Discussion in 'PHP' started by FunkyMonkey, Sep 30, 2007.

  1. #1
    Hi all,

    I'm trying to use exec() and wget, so it looks something like this:

    echo "Executing...";
    exec("wget $link");
    echo "Complete!";
    PHP:
    So the file, (which is quite small) is downloaded, but the "Complete!" message isn't displayed after the wget is carried out?

    Am I doing something wrong?
    Is it also possible to output the progress of the download, before it shows the complete message?

    Cheers :)
     
    FunkyMonkey, Sep 30, 2007 IP
  2. nico_swd

    nico_swd Prominent Member

    Messages:
    4,153
    Likes Received:
    344
    Best Answers:
    18
    Trophy Points:
    375
    #2
    Not that I know much about wget, but give this a try.
    
    exec('wget -N -O ' . $filename . ' "' . $link . '"');
    
    PHP:
     
    nico_swd, Sep 30, 2007 IP