Re: Copy?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux