php.net/unpack

On Sun, 24 Nov 2002, Tim Molendijk wrote:

> Hi all,
>
> I would like to use PHP to read a binary file which contains a structure in
> C, such as:
> struct simple {
>     int a;
>     float b;
> };
> with f.e. a = 2 and b = 1.5.
> Please notice that this is stored as *binary* data and not as text.
>
> I know it is possible to read binary files using fgets() in PHP 4.3.0 or
> higher but then I still don't have a clue how to actually *do* it...
> Is it even possible to read binary files created by C software and if so,
> how to do this in practice - examples would be very welcome.
>
> Thanks in advance,
> Tim
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to