Go Back   CodingForums.com > :: Client side development > General web building

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 12-03-2008, 04:02 AM   PM User | #1
bencharity
New Coder

 
Join Date: Dec 2008
Location: Kennesaw, GA
Posts: 20
Thanks: 0
Thanked 0 Times in 0 Posts
bencharity is an unknown quantity at this point
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
bencharity is offline   Reply With Quote
Old 12-03-2008, 04:12 AM   PM User | #2
PappaJohn
Senior Coder

 
Join Date: Apr 2007
Location: Quakertown PA USA
Posts: 1,028
Thanks: 1
Thanked 125 Times in 123 Posts
PappaJohn will become famous soon enough
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.
PappaJohn is offline   Reply With Quote
Old 12-03-2008, 04:23 AM   PM User | #3
bencharity
New Coder

 
Join Date: Dec 2008
Location: Kennesaw, GA
Posts: 20
Thanks: 0
Thanked 0 Times in 0 Posts
bencharity is an unknown quantity at this point
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
bencharity is offline   Reply With Quote
Old 12-03-2008, 04:32 AM   PM User | #4
PappaJohn
Senior Coder

 
Join Date: Apr 2007
Location: Quakertown PA USA
Posts: 1,028
Thanks: 1
Thanked 125 Times in 123 Posts
PappaJohn will become famous soon enough
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.
PappaJohn is offline   Reply With Quote
Old 12-03-2008, 06:09 AM   PM User | #5
_Aerospace_Eng_
Supreme Master coder!


 
_Aerospace_Eng_'s Avatar
 
Join Date: Dec 2004
Location: In a place far, far away...
Posts: 19,293
Thanks: 2
Thanked 1,044 Times in 1,020 Posts
_Aerospace_Eng_ is a glorious beacon of light_Aerospace_Eng_ is a glorious beacon of light_Aerospace_Eng_ is a glorious beacon of light_Aerospace_Eng_ is a glorious beacon of light_Aerospace_Eng_ is a glorious beacon of light
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!||||
_Aerospace_Eng_ is offline   Reply With Quote
Old 12-03-2008, 10:58 AM   PM User | #6
bencharity
New Coder

 
Join Date: Dec 2008
Location: Kennesaw, GA
Posts: 20
Thanks: 0
Thanked 0 Times in 0 Posts
bencharity is an unknown quantity at this point
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
bencharity is offline   Reply With Quote
Old 12-03-2008, 05:30 PM   PM User | #7
_Aerospace_Eng_
Supreme Master coder!


 
_Aerospace_Eng_'s Avatar
 
Join Date: Dec 2004
Location: In a place far, far away...
Posts: 19,293
Thanks: 2
Thanked 1,044 Times in 1,020 Posts
_Aerospace_Eng_ is a glorious beacon of light_Aerospace_Eng_ is a glorious beacon of light_Aerospace_Eng_ is a glorious beacon of light_Aerospace_Eng_ is a glorious beacon of light_Aerospace_Eng_ is a glorious beacon of light
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!||||
_Aerospace_Eng_ is offline   Reply With Quote
Old 12-03-2008, 09:43 PM   PM User | #8
bencharity
New Coder

 
Join Date: Dec 2008
Location: Kennesaw, GA
Posts: 20
Thanks: 0
Thanked 0 Times in 0 Posts
bencharity is an unknown quantity at this point
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
bencharity is offline   Reply With Quote
Old 12-03-2008, 09:59 PM   PM User | #9
_Aerospace_Eng_
Supreme Master coder!


 
_Aerospace_Eng_'s Avatar
 
Join Date: Dec 2004
Location: In a place far, far away...
Posts: 19,293
Thanks: 2
Thanked 1,044 Times in 1,020 Posts
_Aerospace_Eng_ is a glorious beacon of light_Aerospace_Eng_ is a glorious beacon of light_Aerospace_Eng_ is a glorious beacon of light_Aerospace_Eng_ is a glorious beacon of light_Aerospace_Eng_ is a glorious beacon of light
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!||||
_Aerospace_Eng_ is offline   Reply With Quote
Old 12-03-2008, 10:51 PM   PM User | #10
Fou-Lu
God Emperor


 
Fou-Lu's Avatar
 
Join Date: Sep 2002
Location: Saskatoon, Saskatchewan
Posts: 15,641
Thanks: 4
Thanked 2,448 Times in 2,417 Posts
Fou-Lu is a name known to allFou-Lu is a name known to allFou-Lu is a name known to allFou-Lu is a name known to allFou-Lu is a name known to allFou-Lu is a name known to all
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).
__________________
As of PHP 5.5, the MySQL library has been officially deprecated. It is recommended to move to either MySQLi or PDO libraries for your mysql connectivity. See here for help choosing which interface you prefer: http://php.net/manual/en/mysqlinfo.api.choosing.php
Fou-Lu is offline   Reply With Quote
Reply

Bookmarks

Tags
javascript, mp3, php, soundpop

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 09:25 PM.


Advertisement
Log in to turn off these ads.