Jump to content

Some sort of ecommerce system help needed


walker5595

Recommended Posts

Hey, I am looking for an ecommerce system or just the way how to achieve the following. I am wanting to store some MP3 sound files in a folder called for example 'sounds' on my web server. I then want to be able to stream the files onto my web pages but then I also want people to be able to purchase them. This is where I get confused, how can I achieve this without letting people just be able to download the 'sounds' directory off my web server. I am wanting to do this using PHP obviously. Thanks in advance for help :)

Link to comment
Share on other sites

If you allow people to stream it, you allow people to save it.

 

You can prevent them from directly accessing the files by using an .htaccess rule on the directory.

deny from all

 

Save that code as .htaccess and stick it in the "sounds" directory, and people will no longer be able to navigate to it. However they will still be able to save the files from the stream, but there's nothing you can do about that.

Link to comment
Share on other sites

just figured out WHAT I want, just don't know how to achieve it now. I need the MP3 files to be stored in a folder for example called 'sounds'. If someone directs to /sounds/ they need to be directed to homepage. Then if someone uses a program like WinHTTrack the files won't be downloaded. But then if someone goes to the direct URL such as /sounds/sound1.mp3 then the file will be downloaded. Thanks :)

Link to comment
Share on other sites

You can use a .htaccess rule to redirect traffic that goes to /sounds. Or, you can use Options -Indexes to make it so if someone browses to /sounds, they won't be able to view the contents of the directory (alternatively you can just stick a blank index.html file in it).

 

However there's not really any way to stop something like HTTrack. If you simply guess the file name you could download it. If you want it so they can only download a file once they buy it, you could hide the files in a directory that isn't accessible to the public (like outside the docroot) and then use PHP to serve the file as a download. See here for how to do that. In this way, users wouldn't be able to see where the files come from.

 

Like I said though, you can't stop people from downloading the files freely if you allow streaming. For example that soundowl site, I can download all the MP3's in mere seconds with no problems.

Link to comment
Share on other sites

How does soundowl achieve not able to download every file using that program. All the files are stored on dl.soundowl.com but using that program on that URL does not download all files? Because if I hide all the files if someone does come across where they are stored then they have access to ALL of them  :confused:

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.