You are here: Re: [PHP] Copy? « PHP « IT news, forums, messages
Re: [PHP] Copy?

Posted by Jochem Maas on 02/23/05 13:09

Wiberg wrote:
> Hi there!
>
> How do I copy a file from an URL to my server?
> I url fopen wrappers is NOT enabled, and I'm not allowed to do that.

do you have access to the cURL extension in your php build?
www.php.net/curl

if you do then you should be able to use to do what you want, might
take a bit of reading to figure out all the options you need
to set to correctly send a request and retrieve the desired response
(i.e. have a file returned)

another resort might be to use exec() or a similar function to
call wget (I'm assuming your on *nix)...... and then use fopen to
read the file that wget downloaded - obviously you need to have access
to wget via php and take into account any possible filepermission
pitfalls.

>
> /G
> @varupiraten.se

 

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

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