arnoldr Posted September 25, 2008 Share Posted September 25, 2008 Hello together, I am new in php and I try to write an edf parser in php .edf is a binary coded file with wave forms (looks like that in an editor ÿ¹þqÿñþüþsþÈþþ³þÔþøþïý—ýoý and so on) what I tryed see code below but it did not work even printf doesnt bring an output normal echo brings same usless output as it looks in an text editor any idear? in c# or c++ there is a class called "binary reader" it works good is there something in php? thanks in advance <?php $myFile = "demo.edf"; $handle = fopen ($myFile,"rb"); while (!feof($handle)) { $data= fgetc($handle); //printf("%c", $data); echo chr($data) ; } fclose($handle); ?> Link to comment https://forums.phpfreaks.com/topic/125857-parsing-binary-file/ Share on other sites More sharing options...
DarkWater Posted September 25, 2008 Share Posted September 25, 2008 EDIT: Okay, I take back that then. =P What exactly are you trying to parse out of the file? Link to comment https://forums.phpfreaks.com/topic/125857-parsing-binary-file/#findComment-650807 Share on other sites More sharing options...
arnoldr Posted September 25, 2008 Author Share Posted September 25, 2008 I am sorry, I had troubles with my browser, regards arnold Link to comment https://forums.phpfreaks.com/topic/125857-parsing-binary-file/#findComment-650813 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.