Re: Copy?

From: Date: Wed, 23 Feb 2005 11:09:09 +0000
Subject: Re: Copy?
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-209222@lists.php.net to get a copy of this message
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


« previous php.general (#209222) next »