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]
|