View Full Version : transfer audio from one site to another
james438
06-26-2010, 12:29 AM
After a brief look around I wasn't able to find the answer. How can I create a page where I click a button and an audio file from a friend's site is downloaded to my site or vice versa? I am also looking to echo a line "file has been downloaded successfully" after the transfer is complete.
is your friend's site set up to allow the file to be downloaded?
I've never done anything like this, but you should probably look into cURL (http://us.php.net/manual/en/book.curl.php)
james438
06-26-2010, 04:03 AM
I am not sure if I am able to do this with my server, but I probably can since I have Wordpress and it updates itself in a similar manner. Transferring an audio file may be different though. It seems to have something to do with
file_get_contents()
or
ftp_get()
I have not tried to use file_get_contents() for an audio file before and I have not used php's ftp functions before.
I may need to know the remote file's password, username, and id, which would be annoying, because I wouldn't want to make those things freely available to the public for any reason and then for security reasons it would only be practical to download from one of my sites to another of my sites. I do not think this is the case though. I would like to be able to download a freely available audio file from another site to my own.
djr33
06-26-2010, 04:50 AM
Look into phps FTP functions. Just need details for the server you will access remotely (easiest if destination) then it resembles regular directory/file functions. There are some examples on php.net's example page for ftp_put().
Powered by vBulletin® Version 4.2.2 Copyright © 2021 vBulletin Solutions, Inc. All rights reserved.