Decode String

0

I need to decode a string from an external device via PHP.

This equipment is a crawler that emits information over a period of time for a given host and port. I created a socket that reads the same host and port of the crawler and was able to receive a message. This is the part of the code I am using to display the received values.

socket_listen($webSocket);

        $buff = @socket_read(socket_accept($webSocket), 1024, PHP_BINARY_READ);
        echo "Numero de dados recebidos: $flgSl \n";

        $receiveStrHex = fread($buff);

        var_dump($receiveStrHex);

Part of the string received: e7Xðž, ÒYšþøƒçü À? ¸ 0 'P R R h e e e e e e e e e e e e e e e e e e e e e e e e e e À À À À.

I was trying to use the unpack () method but I was not successful, either.

Thank you.

    
asked by anonymous 17.12.2015 / 14:08

1 answer

1

This was not a coded message.

This string is about memory allocation sent by the machine. To handle the message and work with it, I converted the string to hex.

    
29.12.2015 / 13:49