Results 1 to 5 of 5

Thread: Download page help! (download.php)

  1. #1
    Join Date
    Jan 2010
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question Download page help! (download.php)

    HELP!


    basically, i own a music site, there's various file sharing websites out there, and i want there links to be on my website so that the user can download the file from there site but still stay on my site? if you get what i mean.

    Please help iv searched all over the internet and cant find anything

    iv seen some website have something like this:

    http://download.im1music.net/?link=h...get/BSew7ER8wW

    I want something like.

  2. #2
    Join Date
    May 2007
    Location
    Boston,ma
    Posts
    2,127
    Thanks
    173
    Thanked 207 Times in 205 Posts

    Default

    Do you already have a search function to find the pages? This also might put your site in violation of TOS and could bring legal action.

    http://www.wired.com/epicenter/2009/03/seeqpod-to-musi/
    Corrections to my coding/thoughts welcome.

  3. #3
    Join Date
    Jan 2010
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    LOL! my sites going to be legal, but i need the script that there using or whatever itis? i cant seem to figure it out though. Im also learning php skills but its complicated so i hoped i could find someone to give me the easy ride? i guess.

  4. #4
    Join Date
    May 2007
    Location
    Boston,ma
    Posts
    2,127
    Thanks
    173
    Thanked 207 Times in 205 Posts

    Default

    It's only kind of legal if your providing people with downloads to copyrighted music. First you'll have to search for the pages that are hosting the songs then strip out everything except the link to the media file and put it on your site. For an example of how to get the link...

    Code:
    $song = $_POST['song'];
    $address = "http://site.com/default.asp?song_request=" . $song;
    $location_holder = htmlspecialchars_decode(file_get_contents($address));
    $mode = explode("Your Song is: ", $location_holder);
    $mode = explode("Artist:", $mode[1]);
    
    echo "Ctrl/Right Click Save as for Song: " .$mode[0];
    Assuming the requested page has

    Your Song is: <a href="http://site.com/sound/music.mp3">Song Name</a>
    Artist:

    Option 2 is if the linking is relative

    Code:
    $song = $_POST['song'];
    $domain = "http://site.com";
    $address = "$domain/default.asp?song_request=" . $song;
    $location_holder = htmlspecialchars_decode(file_get_contents($address));
    $mode = explode("Your Song is: ", $location_holder);
    $mode = explode("Artist:", $mode[1]);
    
    echo "Ctrl/Right Click Save as for Song: " .$mode[0];
    You'll have to do some more exploding though to get the $domain in the link tag.
    Last edited by bluewalrus; 01-28-2010 at 08:34 PM. Reason: Editing should have the PHP code tags for an option
    Corrections to my coding/thoughts welcome.

  5. #5
    Join Date
    Jan 2010
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    I dont understand :/

    I want something so when my users click on links it will be like this:

    http://www.sample.com/download/?l=ht...9177/file.html

    but how do i set it up so it does that on my website?

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
  •