Posted by J.O. Aho on 11/26/05 15:40
Kamyk wrote:
>> wget -P/tmp http://www.example.net/files/bigfile.tgz
>>
>> the "-P" option with the path _without_ whitespaces in between the option
>> and
>> the path.
>>
>> <?PHP exec("wget -P/tmp ".$_REQUEST['url']); ?>
>>
>>
>> //Aho
>
>
> Do I have to download this wget program and install on my PHP server???
> Because it doesn`t work. I have created a "tmp" folder in the same folder
> where
> I have the page file (smiec.php) with the code:
Yes, you need to have wget on the server and it has to be in a directory thats
in the $PATH.
http://www.gnu.org/software/wget/wget.html
If you want it for operating system that comes without a compiler, then go to
www.google.com and search for wget.
> <?
> $urlik="http://www.cgm.pl/media/pobierz.php?O_MEDIA_TYP=0&O_MEDIA=8502185&URL_MEDIA=/2005_obraz_dzwiek/media3/sistars_inspirations.mpg";
> exec("wget -P/tmp ".$urlik);
> ?>
>
> After opening the page it even didn`t return any error, so I don`t know what
> to fix it.
> Have I done something wrong?
exec returns a "error" message,
you can do it
$err=exec("wget -P/tmp ".$urlik);
if(!is_empty($err)) {
echo $err;
}
//Aho
[Back to original message]
|