Hi, Tuesday, July 15, 2003, 7:00:33 PM, you wrote: >> > http://www.php.net/pack >> >> A little background on what Im doing. Im attempting to read realaudio >> files for their metadata, so Im reading from a binary string, >> and Im currently using unpack() (Im new to using this function, so I may >> be wrong with its usage) to unpack the data, along with ord(), >> and the result is something like what I posted before -> 0 0 0 18 (I >> put the spaces in there so we know that each number is a byte) >> So Im not exactly sure how the pack() function would play a role in this.
JR> Just in case you're still groggy when you wake up this morning, the page JR> for pack() lists an 'N' format for unsigned long big endian byte order JR> for pack() and unpack(). I think what you probably want to do most is JR> use the 'N' format when you unpack. JR> (The other responses were amusing, was it a full moon last night? ;-)) JR> -- JR> Joel Rees, permanently jetlagged programmer, Kansai Systems Group JR> Altech Corporation (Alpsgiken), Osaka, Japan JR> http://www.alpsgiken.co.jp Trying to use unpack by itself on large binary streams with variable packet sizes and content buried in them can become a nightmare. Try to unscramble an excel file using unpack() :) -- regards, Tom -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php