Results 1 to 3 of 3

Thread: How /cpafiledb.php?action=download&id=636 works?

  1. #1

    Thread Starter
    Frenzied Member
    Join Date
    Apr 2005
    Posts
    1,907

    Arrow How /cpafiledb.php?action=download&id=636 works?

    Hi all i came across some links for mp3 that looks like this :

    Code:
    http://www.somesite.com/pafiledb.php?action=download&id=636
    I wonder how i can make one like this for my mp3 . As u see it does not show the actual url of mp3 but if u click on it it start lunching media palyer and the songs player. Also i wonder how to get the actual url of the song ?Thanks
    Last edited by tony007; May 10th, 2006 at 10:48 AM.

  2. #2
    Hyperactive Member OMITT3D's Avatar
    Join Date
    Mar 2006
    Posts
    368

    Re: How /cpafiledb.php?action=download&id=636 works?

    If there script is setup right there is no URL to the file. You can do this by storing the music off the web server, and then when a user enters id=636 you can have an INI file setup like
    [Music]
    1=Bleh.mp3
    all the way to
    636=Song.mp3

    when the value of 636 is read it will return Song.mp3 you can read the song like you would with a text box, and tell the browser it is an mp3 file by using headers and it will prompt the user to download it. This way you can store all music off the web server, and still have it downloaded.

  3. #3

    Thread Starter
    Frenzied Member
    Join Date
    Apr 2005
    Posts
    1,907

    Re: How /cpafiledb.php?action=download&id=636 works?

    Quote Originally Posted by OMITT3D
    If there script is setup right there is no URL to the file. You can do this by storing the music off the web server, and then when a user enters id=636 you can have an INI file setup like
    [Music]
    1=Bleh.mp3
    all the way to
    636=Song.mp3

    when the value of 636 is read it will return Song.mp3 you can read the song like you would with a text box, and tell the browser it is an mp3 file by using headers and it will prompt the user to download it. This way you can store all music off the web server, and still have it downloaded.
    Thank u for u reply. so suppose i have all exact location of my mp3 in database like this : http://www.mysite.com/music/song1.mp3,... so on

    Now if a user request from my php script like this :

    /cpafiledb.php?action=download&id=636

    How in php i give him this corrspondent to id=636:

    http://www.mysite.com/music/song1.mp3?

Posting Permissions

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



Click Here to Expand Forum to Full Width