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

  • Home
  • SEARCH
  • 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 995173
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T06:40:57+00:00 2026-05-16T06:40:57+00:00

I have a site where users can stream my music from a flash player

  • 0

I have a site where users can stream my music from a flash player or download the individual songs (as mp3s). Right now if you click on the download links, they just play in the browser. Can I make it so the download box will pop up by default without either zipping the files making the user rt. click?

I have my index.php page with the links looking like this (pulling file names dynamically from mySQL:

<table>
.
.
.
<td>
    <?php include 'Media/' . $row['type'] . '/' . $row['folder_name'] . '/download.php' ?>
</td>

and then download.php has this:

<div class="downloadCell">
    <h3>Downloads:</h3>
    <ul>
        <li>
          <a href="auto_download.php?path=Media/<?php echo $row['type'] . '/' . $row['folder_name'] ?>/Chemtengure.mp3">Chemtengure</a>
        </li>
    </ul>
</div>

and I put the auto_download.php in the same directory as index.php:

auto_download.php:

$path = $_GET['path'];
header('Content-Disposition: attachment; filename=' . basename($path));
readfile($path);
  • 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-16T06:40:58+00:00Added an answer on May 16, 2026 at 6:40 am

    You will need to add this HTTP header to your response to make the browser force a download:

    Content-Disposition: attachment; filename=your_filename.mp3
    

    For example, if you’re using PHP on the server side, you can create a script that sends the above header followed by the actual file contents:

    $path = $_GET['path'];
    header('Content-Disposition: attachment; filename=' . basename($path));
    readfile($path);
    

    If you call this script download.php, then linking to download.php?path=/path/to/your/file.mp3 will make the browser pop-up a download dialog for file.mp3.

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

Sidebar

Related Questions

on my site right now I'm trying to have it post to a users
I have a site where users can post stuff (as in forums, comments, etc)
I currently have a site where different users can login, and depending on their
I'm working on a site now that have to fetch users feeds. But how
I have a few users setup in the web.config of an asp.net site to
I have a web-based application that notifies users of activity on the site via
I have a site that uses a couple DropDownLists that are databound. I was
I have a site I made really fast that uses floats to display different
I have a site with the following robots.txt in the root: User-agent: * Disabled:
We have an ASP.NET application running at a customer site that uses ActiveDirectory for

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.