Results 1 to 4 of 4

Thread: transfer audio from one site to another

  1. #1
    Join Date
    Jan 2007
    Location
    Davenport, Iowa
    Posts
    2,385
    Thanks
    100
    Thanked 113 Times in 111 Posts

    Default transfer audio from one site to another

    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.
    To choose the lesser of two evils is still to choose evil. My personal site

  2. #2
    Join Date
    Apr 2008
    Location
    So.Cal
    Posts
    3,643
    Thanks
    63
    Thanked 516 Times in 502 Posts
    Blog Entries
    5

    Default

    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

  3. #3
    Join Date
    Jan 2007
    Location
    Davenport, Iowa
    Posts
    2,385
    Thanks
    100
    Thanked 113 Times in 111 Posts

    Default

    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.

    Edit: 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.
    Last edited by james438; 06-26-2010 at 04:12 AM.
    To choose the lesser of two evils is still to choose evil. My personal site

  4. #4
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,164
    Thanks
    265
    Thanked 690 Times in 678 Posts

    Default

    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().
    Daniel - Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •