Jump to content

[SOLVED] Remote file download / upload from URL


tommyboy123x

Recommended Posts

so.. first time posting without a question

 

this has been bothering me for a while but i've seen about 20 threads on forums where people ask how to download a file to their server from a remote location.... i found this because i was trying to find it myself

 

So anyways, the trick is to use the copy function...

 

copy("$fileURL", "$destination");

 

for $fileURL, you input something like "http://www.TheSiteWithFiles.com/file/directory/thefile.jpg"

for $destination, you do not put an opening slash, and write a relative path, such as "members/content/TheSiteWithFiles/thefile.jpg"

 

i figure i dont really come around to this forum unless i need help, so i hope this can help someone who searches  ;D

 

 

 

i'm not really sure if this is the right place to post this but i saw no better fitting place other than "FAQ/Code Snippet Repository" which is read only.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.