Reading Binary Data

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
Gen-ik
DevNet Resident
Posts: 1059
Joined: Mon Aug 12, 2002 7:08 pm
Location: London. UK.

Reading Binary Data

Post by Gen-ik »

Hi, guys.

Ok, here's the situation: I'm currently using ActionScript 3.0 to send a ByteArray to a PHP file on the server, and then using file_get_contents("php://input") to grab the binary data.

Here's the problem: $data is a binary file ( or string in this case ) that contains X number of unsigned integer values (colour values for an image). I have no idea how to read those integers from the binary data. :(

Could someone please point me in the right direction.

Thanks. :)
User avatar
Weirdan
Moderator
Posts: 5978
Joined: Mon Nov 03, 2003 6:13 pm
Location: Odessa, Ukraine

Post by Weirdan »

Gen-ik
DevNet Resident
Posts: 1059
Joined: Mon Aug 12, 2002 7:08 pm
Location: London. UK.

Post by Gen-ik »

Yep, that's the one. 8)

Thanks, mate.
Post Reply