shlomikalfa Posted August 25, 2007 Share Posted August 25, 2007 what's the correct function for that cause i can't seem to find it no where ! Quote Link to comment https://forums.phpfreaks.com/topic/66601-solved-convert-binary-to-string-how/ Share on other sites More sharing options...
Fadion Posted August 25, 2007 Share Posted August 25, 2007 Take a look at this tutorial in phpfreaks. Also i found this code which may do it: function bin2txt($str) { $text_array = explode("\r\n", chunk_split($str, ); for ($n = 0; $n < count($text_array) - 1; $n++) { $newstring = $newstring . stripslashes(chr(base_convert($text_array[$n], 2, 10))); } return $newstring; } Quote Link to comment https://forums.phpfreaks.com/topic/66601-solved-convert-binary-to-string-how/#findComment-333686 Share on other sites More sharing options...
shlomikalfa Posted August 25, 2007 Author Share Posted August 25, 2007 Does that work with "ANSI" encoding ?! UTF8 ?! UTF16 ?! which kind ? Quote Link to comment https://forums.phpfreaks.com/topic/66601-solved-convert-binary-to-string-how/#findComment-333688 Share on other sites More sharing options...
Fadion Posted August 25, 2007 Share Posted August 25, 2007 No idea buddy, thats not my tutorial nor my code. U should try it yourself first. Quote Link to comment https://forums.phpfreaks.com/topic/66601-solved-convert-binary-to-string-how/#findComment-333689 Share on other sites More sharing options...
shlomikalfa Posted August 25, 2007 Author Share Posted August 25, 2007 anyone else maybe ?! Quote Link to comment https://forums.phpfreaks.com/topic/66601-solved-convert-binary-to-string-how/#findComment-333700 Share on other sites More sharing options...
vijayfreaks Posted August 25, 2007 Share Posted August 25, 2007 Hi.. am not sure.. but you can refer following link: http://www.phpfreaks.com/quickcode/ASCII_to_Binary_to_ASCII_Conversion_Functions/244.php its "ASCII to Binary to ASCII Conversion Functions " via this you can go ahead and from ascii, you bring result as string.. and also "http://tools.elitehackers.info/Binary.php" Regards, Vijay Quote Link to comment https://forums.phpfreaks.com/topic/66601-solved-convert-binary-to-string-how/#findComment-333704 Share on other sites More sharing options...
shlomikalfa Posted August 25, 2007 Author Share Posted August 25, 2007 used hex instead... Quote Link to comment https://forums.phpfreaks.com/topic/66601-solved-convert-binary-to-string-how/#findComment-333720 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.