Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 9 of 9
  1. #1
    Regular Coder
    Join Date
    Sep 2006
    Posts
    122
    Thanks
    4
    Thanked 2 Times in 2 Posts

    using php for a secure xml playlist

    I'm using php to create xml playlists, but the problem is, I don't want people just to decompile the flash file, find the xml file's url - which contains the mp3 urls - and then they can download them for free.

    Whats the easiest method to stop this happening?

  • #2
    Senior Coder chump2877's Avatar
    Join Date
    Dec 2004
    Location
    the U.S. of freakin' A.
    Posts
    2,778
    Thanks
    19
    Thanked 155 Times in 146 Posts
    I think you;re assuming that someone in the PHP forum would know how to "decompile a flash file"...So how does that work exactly? If I knew, maybe I could help you better...
    Regards, R.J.

    ---------------------------------------------------------

    Help spread the word! Like my YouTube-to-Mp3 Conversion Script on Facebook !! :)
    [Related videos and tutorials are also available at my YouTube channel and on Dailymotion]
    Get free updates about new software version releases, features, and bug fixes!

  • #3
    Regular Coder
    Join Date
    Sep 2006
    Posts
    122
    Thanks
    4
    Thanked 2 Times in 2 Posts
    oops, sorry! Basically, there are programs that can get the raw code from a flash file called flash decompilers. and if someone ran one of these on the player theyd obviously find a link to the xml file.

    Thanks
    Matt

  • #4
    Senior Coder chump2877's Avatar
    Join Date
    Dec 2004
    Location
    the U.S. of freakin' A.
    Posts
    2,778
    Thanks
    19
    Thanked 155 Times in 146 Posts
    So how are you thinking that PHP can help you prevent someone from using presumably client side code to extract an XML file name? If the XML file name is embedded in the Flash file? and the Flash file was created in MAcromedia Flash, how does PHP come into play? Are you using PHP inside of Flash -- using PHP with or inside your ActionScript?

    By the way, I have no clue how to get PHP code to work inside of Flash, just trying to clarify the problem...

    Also, can you show me some code, because that would probably help...
    Last edited by chump2877; 02-05-2007 at 09:56 PM.
    Regards, R.J.

    ---------------------------------------------------------

    Help spread the word! Like my YouTube-to-Mp3 Conversion Script on Facebook !! :)
    [Related videos and tutorials are also available at my YouTube channel and on Dailymotion]
    Get free updates about new software version releases, features, and bug fixes!

  • #5
    Regular Coder
    Join Date
    Sep 2006
    Posts
    122
    Thanks
    4
    Thanked 2 Times in 2 Posts
    I dont' have any code at the moment

    My issue is I don't want people to be able to be able to download the mp3s

    Im makign the xml files with php, using mimetypes and dragging info from the database.

    I know I could use a streaming server of some sort to make the mp3s not downloadable, but i was wondering whether there was an easier way or a way of encrypting the xml or something?

    Matt

  • #6
    Senior Coder chump2877's Avatar
    Join Date
    Dec 2004
    Location
    the U.S. of freakin' A.
    Posts
    2,778
    Thanks
    19
    Thanked 155 Times in 146 Posts
    I think you answered your own question?...why don;t you encrypt the mp3 URLs inside your XML file...you don't have to encrypt the whole file...

    But I'm fuzzy on how your Flash player is interacting with the XML file (like how is the playlist read by the Flash player?)...not my area of expertise I guess...If you encrypt your mp3 URLs, does that cause problems with the Flash player? Would you be able to decode the URLs to access and play the mp3 files (with Flash)? Or would you have to decode the XML with a client side script, instead of PHP? Would this decryption code be embedded inside Flash?

    Encryption might be an option if I understood how your Flash player could possibly decode the encrypted data...

    Maybe this question belongs in the Graphics and Multimedia forum?
    Last edited by chump2877; 02-05-2007 at 11:58 PM.
    Regards, R.J.

    ---------------------------------------------------------

    Help spread the word! Like my YouTube-to-Mp3 Conversion Script on Facebook !! :)
    [Related videos and tutorials are also available at my YouTube channel and on Dailymotion]
    Get free updates about new software version releases, features, and bug fixes!

  • #7
    Regular Coder
    Join Date
    Sep 2006
    Posts
    122
    Thanks
    4
    Thanked 2 Times in 2 Posts
    The XML file is being read like this:

    http://www.theflashplace.com/tutoria...L:_VERY_useful

    The reason i posted this here is because the server side scripting im using is php. I guess a simpler question would be is there an easy way to make XML files not accessible or readable using PHP?

  • #8
    Super Moderator
    Join Date
    May 2002
    Location
    Perth Australia
    Posts
    4,047
    Thanks
    10
    Thanked 93 Times in 91 Posts
    Your question is more about hotlinking than anything, google on how to prevent hotlinking to your mp3 file or directory. Or as an alternative serve XML files only to a given host or ip (localhost)
    resistance is...

    MVC is the current buzz in web application architectures. It comes from event-driven desktop application design and doesn't fit into web application design very well. But luckily nobody really knows what MVC means, so we can call our presentation layer separation mechanism MVC and move on. (Rasmus Lerdorf)

  • #9
    Senior Coder chump2877's Avatar
    Join Date
    Dec 2004
    Location
    the U.S. of freakin' A.
    Posts
    2,778
    Thanks
    19
    Thanked 155 Times in 146 Posts
    Quote Originally Posted by tribalmaniac View Post
    The XML file is being read like this:

    http://www.theflashplace.com/tutoria...L:_VERY_useful

    The reason i posted this here is because the server side scripting im using is php. I guess a simpler question would be is there an easy way to make XML files not accessible or readable using PHP?
    It looks like you are embedding Javascript inside of the Flash file, and the JS inside the Flash file is opening the XML playlist.

    So theoritically, you should be able to encrypt the mp3 URLs with PHP (using some algorithm) and then decrypt the URL's in your javascript, after you have opened the XML file, using the same algorithm...

    Have fun figuring out how to do that (and choosing a method of encryption/decryption) , but it certainly seems doable...
    Regards, R.J.

    ---------------------------------------------------------

    Help spread the word! Like my YouTube-to-Mp3 Conversion Script on Facebook !! :)
    [Related videos and tutorials are also available at my YouTube channel and on Dailymotion]
    Get free updates about new software version releases, features, and bug fixes!


  •  

    Posting Permissions

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