phpcoder2013 Posted August 21, 2013 Share Posted August 21, 2013 Is there any way with PHP to download a file (from a URL) to the server without using my internet connection? PS: I am new to PHP Link to comment https://forums.phpfreaks.com/topic/281445-downloading-to-server/ Share on other sites More sharing options...
Muddy_Funster Posted August 22, 2013 Share Posted August 22, 2013 is there any way you could elaborate on that question? Link to comment https://forums.phpfreaks.com/topic/281445-downloading-to-server/#findComment-1446206 Share on other sites More sharing options...
requinix Posted August 22, 2013 Share Posted August 22, 2013 You want to download something from the internet... without using your internet connection? Link to comment https://forums.phpfreaks.com/topic/281445-downloading-to-server/#findComment-1446230 Share on other sites More sharing options...
kicken Posted August 22, 2013 Share Posted August 22, 2013 If you initiate a download on a server, it would use that server's internet connection, not your personal internet connection. Unless your server happens to use the same personal connection (ie, a server at your house) that is. Link to comment https://forums.phpfreaks.com/topic/281445-downloading-to-server/#findComment-1446237 Share on other sites More sharing options...
phpcoder2013 Posted August 22, 2013 Author Share Posted August 22, 2013 If you initiate a download on a server, it would use that server's internet connection, not your personal internet connection. Unless your server happens to use the same personal connection (ie, a server at your house) that is. Is there a script I need to use or is there a button on the webserver? Link to comment https://forums.phpfreaks.com/topic/281445-downloading-to-server/#findComment-1446342 Share on other sites More sharing options...
jazzman1 Posted August 22, 2013 Share Posted August 22, 2013 Is there a script I need to use or is there a button on the webserver? First thing you should have to learn is, what a server is and what a server does. Try to "Google it". Link to comment https://forums.phpfreaks.com/topic/281445-downloading-to-server/#findComment-1446397 Share on other sites More sharing options...
phpcoder2013 Posted August 22, 2013 Author Share Posted August 22, 2013 First thing you should have to learn is, what a server is and what a server does. Try to "Google it". Than what is kicken, on 21 Aug 2013 - 9:15 PM trying to say? Link to comment https://forums.phpfreaks.com/topic/281445-downloading-to-server/#findComment-1446400 Share on other sites More sharing options...
jazzman1 Posted August 22, 2013 Share Posted August 22, 2013 Than what is kicken, on 21 Aug 2013 - 9:15 PM trying to say? An intranet or a home network connection should be Ok. Link to comment https://forums.phpfreaks.com/topic/281445-downloading-to-server/#findComment-1446403 Share on other sites More sharing options...
phpcoder2013 Posted August 23, 2013 Author Share Posted August 23, 2013 Never mind, the following script only minimally uses my internet connection $file = 'http://ferrebeekeeper.files.wordpress.com/2012/12/m104_ngc4594_sombrero_galaxy_hi-res.jpg';$newfile = 'Image.jpg';if (!copy($file, $newfile)) {echo "failed to copy $file...\n";}else{echo $file . ' has been successfully copied to ' . $newfile;}?> Link to comment https://forums.phpfreaks.com/topic/281445-downloading-to-server/#findComment-1446462 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.