title: Streaming mp3 file through php
body: <p>Here is my php code to stream mp3 file through php</p>
  
  <pre><code>set_time_limit(0);
  $dirPath = "path_of_the_directory";
  $songCode = $_REQUEST['c'];
  $filePath = $dirPath . "/" . $songCode . ".mp3";
  $strContext=stream_context_create(
      array(
          'http'=&gt;array(
          'method'=&gt;'GET',
          'header'=&gt;"Accept-language: en\r\n"
          )
      )
  );
  $fpOrigin=fopen($filePath, 'rb', false, $strContext);
  header('content-type: application/octet-stream');
  while(!feof($fpOrigin)){
    $buffer=fread($fpOrigin, 4096);
    echo $buffer;
    flush();
  }
  fclose($fpOrigin);
  </code></pre>
  
  <p>It's working on Mac Mini and all other PCs but not working on iPad and iPhone. Even streaming is working on all other smart phones. Your help would be appreciated.</p>
  
  <p>Thanks</p>