FalseProphet Posted July 3, 2011 Share Posted July 3, 2011 I have a socket that queries my custom server app which sends a structure of 4 bytes back to the php script to receive. When the script receives it, it comes out as gibberish, like "¶ɅȒȂ██□♥♦▼○╫╬╬╪". Normally this isn't a problem as I would just peek at received buffer, but to my knowledge php does not have a memory read function of any sort? So how can I read the received information? Link to comment https://forums.phpfreaks.com/topic/240980-how-can-i-read-4-bytes-of-received-data/ Share on other sites More sharing options...
monkeytooth Posted July 3, 2011 Share Posted July 3, 2011 Maybe if you can base64_encode it on the sending side, and base64_decode it on the receiving. Depending on what your sending back and forth it may just be getting lost in translation so to speak. But, its just a thought. Link to comment https://forums.phpfreaks.com/topic/240980-how-can-i-read-4-bytes-of-received-data/#findComment-1237813 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.