Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6996771
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T20:11:59+00:00 2026-05-27T20:11:59+00:00

I am making a site which will have music playing on the site using

  • 0

I am making a site which will have music playing on the site using HTML5 tags and was wondering if there was any way to protect the files from being downloaded?

I am calling the music file through PHP and if needed it selects an OGG file for browsers that don’t support MP3.

The actual files are inaccessible to the public but the PHP file can be downloaded and played.

I was wondering if there was anything I could do which would stop people downloading the file but allow it to be played through the tags?

EDIT:

I know that the user must be able to access the URL for the file to play.

I am wondering how to prevent download when the user accesses the file without the tag.

I believe YouTube do a similar thing with the HTML5 video tag (either that or all YouTube videos are now free to download)

EDIT 2:

I have noticed that when a file is downloaded by the user, it does not get passed a HTTP_CACHE_CONTROL variable in the $_SERVER array.

Would this be able to prevent people downloading the file by returning a blank file if they directly download it?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T20:11:59+00:00Added an answer on May 27, 2026 at 8:11 pm

    and was wondering if there was any way to protect the files from being downloaded?

    Nope. The browser has to download the file, hence there is nothing you can do to protect it. You could start using a streaming solution that would make downloading the file at least more difficult, but then you’d have to use proprietary technology like Flash.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am making my first app which will use push notifications. I have decided
I'm in the process of making my PHP site Unicode-aware. I'm wondering if anyone
I have a web-site based on PHP, to which I would like to add
I'm making a site that will be translated into x languages. All strings must
I have a site which is built in ASP.net and C#. Let's call it
Background I'm working on a an educational JavaScript application/site (SPA) that will eventually have
I'm making a site for a friend (artist). He wishes to have a gallery.
I've been tasked with making an already existing e-commerce site SE friendly - which
I'm currently making a site where i want to implement multi-language version. which actually
I am designing a typical ASP.NET site which will connect to database to retrieve

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.