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 824951
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T03:10:36+00:00 2026-05-15T03:10:36+00:00

Ok, I’m trying to play an HTML audio code on iPad but does not

  • 0

Ok, I’m trying to play an HTML audio code on iPad but does not work.

I created one PHP script to send to the MP3 request to the HTML5 audio code

mp3_file_player.php?n=mp3file.mp3

The player is here:
http://www.avault.com/news/podcast-news/john-romero-podcast-episode-80/

You will see that works on every HTML5 supported browser even on my iPod Touch. But does not work on iPad/iPhone, even on Safari on Mac OSX (I tried on Safari/Windows, worked fine)

This is my PHP code:

header("X-Powered-By: ");
header("Accept-Ranges: bytes");
header("Content-Length: ". (string)(filesize($episode_filename)) ."");
header("Content-type: audio/mpeg");
readfile($episode_filename);
exit();

Everything works fine, the MP3 has the same headers like reading the mp3 directly.

HTTP Headers from direct file access:

(Status-Line) HTTP/1.1 200 OK
Date Mon, 31 May 2010 20:27:31 GMT
Server Apache/2.2.9
Last-Modified Wed, 26 May 2010 13:39:19 GMT
Etag "dac0039-41d91f8-4877f669cefc0"
Accept-Ranges bytes
Content-Length 50656162
Content-Range bytes 18390614-69046775/69046776
Keep-Alive timeout=15, max=100
Connection Keep-Alive
Content-Type audio/mpeg

HTTP Header from my PHP script:

(Status-Line) HTTP/1.1 200 OK
Date Mon, 31 May 2010 20:27:08 GMT
Server Apache/2.2.9
Accept-Ranges bytes
Content-Length 69046776
Keep-Alive timeout=15, max=100
Connection Keep-Alive
Content-Type audio/mpeg

The only thing different it’s the Content-Range, I even tried to add it, but if I use it the player will not work on my Ipod Touch. So I removed.

Thank you very much.

  • 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-15T03:10:37+00:00Added an answer on May 15, 2026 at 3:10 am

    Try remove header("Accept-Ranges: bytes"); as your not sending a portion of the file.
    Remove the header("X-Powered-By: "); as Apache serves that anyway

    $etag = md5(serialize(fstat($fp))); 
    fclose($fp); 
    header('Etag: '.$etag); 
    

    ^^ Add an Electronic Tag

    And give it a go!

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

Sidebar

Ask A Question

Stats

  • Questions 454k
  • Answers 454k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer The idea remains to push to an existing SVN branch.… May 15, 2026 at 9:52 pm
  • Editorial Team
    Editorial Team added an answer There's one notorious gotcha for not in. Basically, id not… May 15, 2026 at 9:52 pm
  • Editorial Team
    Editorial Team added an answer You can define PACK like as follows for GNU GCC… May 15, 2026 at 9:52 pm

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.