Music In Php - i don't get how this works

free web hosting
Open Discussion > CONTRIBUTE > Computers > Programming Languages > PHP Programming

Music In Php - i don't get how this works

iwuvcookies
Ok i went to a site to listen to music and instead of giving me some file with a mp3 extention they have .php with an id #. Like this....

http://www.emp3world.com/to_download.php?id=53465


i was wondering how would a person do this and what's the purpose of it? is it like for safety reasons?

Reply

snlildude87
PHP itself cannot generate music on the fly - not to my knowledge. First of all, the link that you are referring does not work due to massive hotlinking, but if it works, then it would first call the file (or script) "to_download.php". Then, the script would take the id number and find the corresponding .mp3 file for you to download. That's how it would work.

Reply

Tyssen
QUOTE(iwuvcookies @ May 25 2005, 12:11 PM)
i was wondering how would a person do this and what's the purpose of it? is it like for safety reasons?

Yes it's a security measure to make sure people can only d/l from the site (usually after having paid) and not via FTP or whatever. If you were paying for MP3s, this would stop you passing the direct link to the file on to your friends so that they could then d/l it (although you could still just send them the file yourself).

Reply

badinfluence
hey, i cut and paste in the browser line, it is streaming and reach to back door ..
unsure.gif

and how? huh.gif

Reply

Spectre
There are a number of ways in which such a system can work, and a number of reasons for using it. Some of the more common reasons are for security, as has been mentioned, but also for tracking purposes - it's more practical to store the number of times a file has been accessed through a tracking script than look through a log file to count the access attempts.

The ways in which it can work vary. It can be a unique file ID corrosponding to only that file which will then be looked up in the database, but that is more likely to be for tracking purposes than security reasons. If it was for security, it would more likely be a session hash or something else that uniquely identified you and the file you were seeking, rather than a simple file ID. So anyway, after the file is located, it will usually do one of two things: i) Redirect you to the location of the actual file (eg. header('Location: /file.mp3')), or ii) Get the contents of the file and send it to you directly. The latter is more commonly used in situations where security is a priority; if you are redirected to a direct download point, then you can obviously just use that URL again later and not have to go through the initial process.

Hope that helps.

 

 

 


Reply



Got an Opinion! Express your Views! (no registration):-
Add your Reply/ Opinion/ Views/ Comments/ Suggestion/ Questions/ Queries etc.
Posts with decent grammar & English will be accepted and please refrain from profanities.
For asking a Question, We recommend you to sign-up (for free) so that you can track the topic easily.

Nature of your Post*: Opinion/ Reply/ Comments
Question/Query
Feedback to us.
       
Name   Email
Title/Question*

(Maximum characters: 10,000)
You have characters left.

Recent Queries:-
  1. "music in php" - 132.80 hr back. (1)
Similar Topics

Keywords : php works

  1. Help Improving My Login Script Code - The code works okay...just not the authorization part (4)
  2. Making A Sig With Php - just wondering how it works (7)
    I was just wondering how to make an image that uses stuff given to it by php, yet remains only an
    image - say I want the site's title in an image. I believe it has something to do with putting
    an index.php inside a folder called image.png or whatever. Am I right? thanks...
  3. Script Won't Work At Trap17 -- Version Differences? - But works flawlessly in my machine... (12)
    Here is the code: CODE <?php $data_array = array(); $data_array2 =
    array(); $file_name = "menu_data.txt"; $handle =
    @fopen($file_name, "r"); if (!$handle)  {     echo "File
    Handle Not Available For Use"; exit;         } while (($data = fgetcsv(
    $handle, 1000, ",")) !== FALSE) {         if ( (strpos
    ($data[2],"$page=")))     {
                        $data_array[] =  t...
  4. Error Importing Sql Query Via Php - Works in PHPmyAdmin (6)
    CODE     function sql()     {         $fp =
    fopen("sql.sql","r");         $sql =
    fread($fp,filesize("sql.sql"));         fclose($fp);
            return $sql;     } Thats $this->sql and here is the other source CODE
    function insert_sql()     {     if($_GET['insert'])  {
            $template = new template;         $db = new db;
            $db->connect();         $query = $this->sql();       ...
  5. Form Dosn't Submit In Opera - Works in IE and FireFox (1)
    My form dosn't submit, it works in IE and FF, its validated HTML 4.01 and all, Code:
    /**********************************/ /** Post Topic :: EvilBoard **/
    /**********************************/ /* Session Start */ session_start(); /* Start Submit Script */
    if ( isset($_POST )) { header("Refresh: 0; redirect.php?posttopic");
    define("RELOADED","YES"); } /* End Submit Script */ /* Include File::Header.php */
    include("include/header.php"); echo " "; /* If Script can't find SESSION user_name */ if (
    !$_SESSION ) { /* Echo :: Forbiden */ echo '...
  6. Gasp! Something I Made Actually Works! - It does! (7)
    http://jemclan.trap17.com/other/something.php Use "annylei" for the name and "something" for the
    pass....



Looking for music, php, works

*RANDOM STUFF*





*SIMILAR VIDEOS*
Searching Video's for music, php, works

*MORE FROM TRAP17.COM*
advertisement



Music In Php - i don't get how this works



 

 

 

 

ADD REPLY / Got an Opinion! a humble request :-) RAPID SEARCH! Free Hosting [X]
Express your Opinions, Thoughts or Contribute your information that might help someone here.
Ask your Doubts & Queries to get answers.. "Together, We enlight each other!"
Register FREE for AD-FREE forum, Create your own topics, Ask Questions, track topics, setup subscriptions & notifications and Get a Free Website w/ Email and FTP.
500MB Space *No Ads*, CPanel, FTP, PHP, MySQL, EMails - 100% FREE