You are here: Re: Strange form - upload file from a server or a URL address « All PHP « IT news, forums, messages
Re: Strange form - upload file from a server or a URL address

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

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация