satal keto Posted March 12, 2007 Share Posted March 12, 2007 I have been trying to find out how to get a PHP script to download a file from another server (via HTTP not FTP) and save it to the server that is running the PHP script. I have been able to find out how to upload a file from say my computer and how to download a file from the server to my computer but not from one server to another. I was wondering whether anyone has any ideas on how I would be able to do this or somewhere which has information which would help me to figure this out Thanks for any help in advance Satal Keto Quote Link to comment Share on other sites More sharing options...
Wuhtzu Posted March 12, 2007 Share Posted March 12, 2007 What type of files are we talking about? Because if it happens to be either images or text there is specific ways of dealing with exactly those to types of files which wont work for copying files generally Quote Link to comment Share on other sites More sharing options...
satal keto Posted March 12, 2007 Author Share Posted March 12, 2007 no not images or txt files. Zip files rar files exe files really Quote Link to comment Share on other sites More sharing options...
trq Posted March 12, 2007 Share Posted March 12, 2007 If your on Linux one way would be to use wget. eg; <?php exec('wget http://domain.com/file.rar'); ?> Quote Link to comment Share on other sites More sharing options...
Wuhtzu Posted March 12, 2007 Share Posted March 12, 2007 Just checked the manual... Why not use: http://no.php.net/copy Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.