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 10 of 10
  1. #1
    New Coder
    Join Date
    Dec 2008
    Location
    Kennesaw, GA
    Posts
    20
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question Is PHP what I need??

    Ok, I have tried everything I know but am not sure how to make this happen; it seems like it should be easy so here goes.

    I have started a website for guitar chord charts and other resources. It's main goal is to equip worship leaders and teams. Part of this goal is to offer an mp3 of the song to listen to online for practice purposes. But I obviously need to protect these somehow.

    [please do not launch into a discussion on how you cannot fully protect an mp3 online; I realize this]

    So right now if you go to this page: http://www.thebenjaminresource.com/h..._by_title.html you will see song titles followed by icons. The furthest icon to the right is a speaker icon. When you click on this it enacts soundpop.js which opens a small window and places the mp3 inside with the information. (see it in action by clicking the top most speaker next to the song titled '40')

    What I am needing is to stop the 'right-click' ability. I'm thinking there should be a way to protect that folder unless it is accessed by my javascript. So any other attempt (whether right-click, or external linking) would be denied access to my folder of music.

    Any help would be extremely appreciated!

    Thanks in advance!
    Ben

  • #2
    Senior Coder
    Join Date
    Apr 2007
    Location
    Quakertown PA USA
    Posts
    1,028
    Thanks
    1
    Thanked 125 Times in 123 Posts
    You cannot disable right-clicking using php as php is a server-side technology. You'd want to look into JavaScript (client-side), and I won't bother saying how futile an attempt it will be.

  • #3
    New Coder
    Join Date
    Dec 2008
    Location
    Kennesaw, GA
    Posts
    20
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Thanks

    Thanks for the response.

    But if I can't disable the right click, can I not go about it by protecting the folder that the mp3s are in?

    Thanks again
    Ben

  • #4
    Senior Coder
    Join Date
    Apr 2007
    Location
    Quakertown PA USA
    Posts
    1,028
    Thanks
    1
    Thanked 125 Times in 123 Posts
    While you can take steps to protect the files from direct access and/or hotlinking, the essential problem is that in order for a browser to display anything (or, in this case, "play" it), the file must be present on the user's computer.

    So, even taking the step of disabling right-click (through JS) is really useless, since the file is, in fact, on the user's system.

  • #5
    Supreme Master coder! _Aerospace_Eng_'s Avatar
    Join Date
    Dec 2004
    Location
    In a place far, far away...
    Posts
    19,291
    Thanks
    2
    Thanked 1,043 Times in 1,019 Posts
    What I would do is find a flash mp3 player or create your own that allows you to create a prefix in the .fla file. The prefix will be a folder that only you know the name to. It will be appended to any mp3 url that you give to the flash player. I do this on a site that I manage and it has cut down a lot on people direct linking to mp3s. Search for "JW FLV MEDIA PLAYER" in google to find a player that is capable of doing this. I would give you a link but it gets picked up as spam.
    ||||If you are getting paid to do a job, don't ask for help on it!||||

  • #6
    New Coder
    Join Date
    Dec 2008
    Location
    Kennesaw, GA
    Posts
    20
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Thanks!

    Thanks so much for the quick responses!

    I'll definitely try to get in and mess with some flash.

    Does JW FLV Player allow me to embed it in my pop up window? I would really like to keep it in there mainly because I don't really have the spare real estate to have the player on the page.

    Thanks again guys,
    Ben

  • #7
    Supreme Master coder! _Aerospace_Eng_'s Avatar
    Join Date
    Dec 2004
    Location
    In a place far, far away...
    Posts
    19,291
    Thanks
    2
    Thanked 1,043 Times in 1,019 Posts
    Yes. It helps to just try it you know.
    ||||If you are getting paid to do a job, don't ask for help on it!||||

  • #8
    New Coder
    Join Date
    Dec 2008
    Location
    Kennesaw, GA
    Posts
    20
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Ok...

    Ok, obviously sensing a little frustration. I appreciate your help, but please if this is wearing on you, move on. I apologize for my second question, but I have been sent on many paths from 'experts' such as yourself that ended up requiring me to change my entire layout. I merely assumed that if you had experience with this script, you might be able to send a quick answer (2-3 letters would suffice) and possible save me many wasted hours.

    Thank you again for your help

  • #9
    Supreme Master coder! _Aerospace_Eng_'s Avatar
    Join Date
    Dec 2004
    Location
    In a place far, far away...
    Posts
    19,291
    Thanks
    2
    Thanked 1,043 Times in 1,019 Posts
    Yes I use it on all of my sites. Why wouldn't it work in a popup? A popup contains a normal html page. If it works on an html page it will work in the popup. It wouldn't take hours to get working. It would take maybe 15 minutes if that. What I'm getting at is there is documentation on that site to get the player working. There are even common questions and answers.
    ||||If you are getting paid to do a job, don't ask for help on it!||||

  • #10
    God Emperor Fou-Lu's Avatar
    Join Date
    Sep 2002
    Location
    Saskatoon, Saskatchewan
    Posts
    16,979
    Thanks
    4
    Thanked 2,659 Times in 2,628 Posts
    Sorry for stepping on you're toes AE, but I'm going to move this to General Webbuilding. Let one of the client mods know if it should be in a different one (doesn't seem to quite match JS alone).
    PHP Code:
    header('HTTP/1.1 420 Enhance Your Calm'); 


  •  

    Tags for this Thread

    Posting Permissions

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