ilikephp Posted September 8, 2009 Share Posted September 8, 2009 Hello, I am using flash player, php and sql to upload my music on my website, the mp3 folder should not be viewed, so I put it above the document root Absolute path became: /home/user/mp3/ HTTP path: what should it be please? Thanks, Quote Link to comment https://forums.phpfreaks.com/topic/173534-about-path/ Share on other sites More sharing options...
micmania1 Posted September 8, 2009 Share Posted September 8, 2009 There is no HTTP root if it is outside of your web directory. To play your mp3's online, you must store them inside the web directory. Quote Link to comment https://forums.phpfreaks.com/topic/173534-about-path/#findComment-914704 Share on other sites More sharing options...
ilikephp Posted September 8, 2009 Author Share Posted September 8, 2009 if I put them inside the directory, how can I protect the folder not to be opened, only people can listen to the music? Quote Link to comment https://forums.phpfreaks.com/topic/173534-about-path/#findComment-914705 Share on other sites More sharing options...
DarkWater Posted September 8, 2009 Share Posted September 8, 2009 above the document root HTTP path That's like dividing by zero. It just doesn't work. In all seriousness, the whole point of storing something above the document root is so that there is no HTTP path. You can make a script to push the MP3's to the browser if you want. That would work even if the MP3's are stored above the web root. Quote Link to comment https://forums.phpfreaks.com/topic/173534-about-path/#findComment-914707 Share on other sites More sharing options...
DarkWater Posted September 8, 2009 Share Posted September 8, 2009 if I put them inside the directory, how can I protect the folder not to be opened, only people can listen to the music? What do you mean "not to be opened"? You mean like, actually go and browse the contents of the folder? Quote Link to comment https://forums.phpfreaks.com/topic/173534-about-path/#findComment-914709 Share on other sites More sharing options...
ilikephp Posted September 8, 2009 Author Share Posted September 8, 2009 yeah I mean not to browse the content of the folder and be able to download the music, beacause they can listen to them only. Is there a way to protect it? Quote Link to comment https://forums.phpfreaks.com/topic/173534-about-path/#findComment-914715 Share on other sites More sharing options...
DarkWater Posted September 8, 2009 Share Posted September 8, 2009 yeah I mean not to browse the content of the folder and be able to download the music, beacause they can listen to them only. Is there a way to protect it? You can try...but there's nothing that you can actually do to protect it completely. The only way for that to happen would be to make a music player in Flash that serves the music. That's the only way I can think of, at least. Quote Link to comment https://forums.phpfreaks.com/topic/173534-about-path/#findComment-914720 Share on other sites More sharing options...
ilikephp Posted September 8, 2009 Author Share Posted September 8, 2009 this is the website that I am using: www.flamplayer.com when I put the mp3 folder outside the root directory, I could see the music while uploading them but the only problem I got is that I can not listen to them. Quote Link to comment https://forums.phpfreaks.com/topic/173534-about-path/#findComment-914726 Share on other sites More sharing options...
Adam Posted September 8, 2009 Share Posted September 8, 2009 Sounds like the file permissions aren't right... Try using chmod to set them as you upload the file. Quote Link to comment https://forums.phpfreaks.com/topic/173534-about-path/#findComment-914729 Share on other sites More sharing options...
DarkWater Posted September 8, 2009 Share Posted September 8, 2009 http://www.flamplayer.com/flamplayer_demo/doc/fp_doc_en.html#auto_record Reading the documentation is a good idea. You need to go and run the MP3s through FLAM player's interface so that it can analyze them and store the whole thing in the database. Quote Link to comment https://forums.phpfreaks.com/topic/173534-about-path/#findComment-914732 Share on other sites More sharing options...
ilikephp Posted September 8, 2009 Author Share Posted September 8, 2009 I read all the documentation and the music are stored in the database. The problem is that I dont want people to type and browse: www.mywebsite.com/mp3/... and download all the music manually. Quote Link to comment https://forums.phpfreaks.com/topic/173534-about-path/#findComment-914748 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.