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 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 log in and check on outstanding support
Let's say I have a site where Users can add Entries through admin panel.
I currently have a web site where users can select a custom theme. After
I have a section of my site where users can add addresses to their
I have created a page on my site where users can post directly to
I have a form where my users can register to my site. They fill
I have a wp-network installed with users that can create pages in each site.
I have a site where users can save images together with a couple of
I have a site where users can suggest a restaurant / Bar. The form

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.