php - Convert BLOB jumble to 0s and 1s [byte stream to binary string] -


i have blob column in mysql table. when echo value of field using php

sbτf¶☼╢ñ═∩p╙  _ë    ☺k ☺♦ Å☼♂↔☻        ♥  

is there way me convert binary string of 0s , 1s?

this data not image , not text, small udp packages of data 0s , 1s have significance , need load data , interpret it

i couldn't find solution this, i'm going reinvent wheel bit.

function bindigitsfromstring($str) {     $r = '';     for($i=0; $i<strlen($str); $i++) $r .= sprintf("%08b",ord($str[$i]));     return $r; } 

Comments

Popular posts from this blog

windows - Single EXE to Install Python Standalone Executable for Easy Distribution -

c# - Access objects in UserControl from MainWindow in WPF -

javascript - How to name a jQuery function to make a browser's back button work? -