title: reading binary code of a file...in PHP
body: <p>How can I read the binary code(to get the 1s and 0s) of a file.</p>
  
  <pre><code>$filename = "something.mp3";
  $handle = fopen($filename, "rb");
  $contents = fread($handle, filesize($filename));
  fclose($handle);
  </code></pre>
  
  <p>I tried this but it shows some strange characters... I presume that this is the formated binary? I was hoping to get the 1's and 0's instead.</p>
  
  <p>Also I am not looking only <code>.mp3</code> files it could be anything .e.g: <code>.txt</code> , <code>.doc</code> , <code>.mp4</code>, <code>.php</code>, <code>.jpg</code>, <code>.png</code> etc.... </p>