vodvud / php_zklib

GNU General Public License v2.0
23 stars 19 forks source link

Getting Fingerprint Result To Unknown Character #21

Open aice09 opened 4 years ago

aice09 commented 4 years ago

I am using the following code to check if the fingerprint data.

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Document</title>
</head>
<body>

<?php
    $enableGetDeviceInfo = true;
    $enableGetUsers = true;
    $enableGetData = true;

    include('zklib/ZKLib.php');

    $zk = new ZKLib(
        '192.168.5.166' //your device IP
    );

    $ret = $zk->connect();
    if ($ret) {
        $zk->disableDevice();
        $zk->setTime(date('Y-m-d H:i:s')); /
        ?>

        <?php if($enableGetUsers === true) { 

                    $getFingerprint = $zk->getFingerprint(237);
                    if (count($getFingerprint) > 0) {
                        foreach ($getFingerprint as $key => $value) {
                            echo $value.'<br><br><br>';
                        }
                    } 
        } 
        $zk->enableDevice();
        $zk->disconnect();
    }
?>
</body>
</html>

Then the following characters display:

0�MiSS21*) ��+i��$�*'��%�K�oH*��~��*��W2$��&P�*=v���*�)�l+$��;u�*2A���*�/P;%��6I+����*����%�$�(+Mi-�}*5-���$�?��C+9�Gi�*R���;$�U��S+2XYp�*^��b��U��2�~� 7G~��}�n|b�����j|JSYe��y 1�y֔��- �Q/?7 ��8��= �� ���O ! �e,.7��2 �+��#/�����&���~�oe$�*�ab��X���ŖP�Y"������K�z���1 ��W,��� �&�� L{��#�{څ��Ҩ�@� ��Wˆ����d��KS �}�}�i*ut� Y���M�pa ��%Q:� �”��\2GË �<�����<�Y����f��?CU���PW�i*�GeG����n��ŦI��Ë҈�0�|�q���V������;w*�TK���������:����U�F�!��r�q�C–'c�O~~�e *����>�m*���CŖ�������D�J*��-��D���a�w���� +���O����nq�����tb{� Œ�jw�U�]�9]��7�� *��'��­� *y�@pZ�*s�C{������������������O��+�E�C����?�Vľ]*F�@X�P:(��=j�������������;���������8�@�C�����l��s��|4�%��0����B�1�I�Cs�i ������Y����Zt������R M�C������R��VwՉ��:��*��4E�Ŷ��G7�&4�f���G�ޣ׊t����Z����Q���:����h0��:l01����1e[x81 M)�RB�C*ER

(�MaSS21"# ��#i��!�"=���q-_Oc"U"�R��"Y���-����"W���y"�R�sN-��E��"O���9"�P� 3,��B~�"<����"���)�,��>��"�S� ^"GE�T-MN++#BL:��"H����-�X�d��)��)��y�~#Lg��6��5�Yw������P�M������m��G.m]�?4��'3 ��d���`�����M����w�b���m��l%��5 ���5)�����m�1�|�|�h���Ѓtݥ͊!�1z�۔�Ѓ���" ��.�������׶��UnH-K ����.�As���?��~�q Ż _����f��� �w���w��� �=�i�z��?�:%�F}�x�F>��w�}��R��"\S`����T� ��p��s�Y ���?�p}W��@�S�q��.����G�rZ���[s�Y�:~�u�n���~����������y��*�U���="����>����i��~po0�����9��EBaxgZz }�V�s�2��d���\z ���;��� ���������s��TG��}��b�VnD^�<��������:��dT ��Fj_���F��U_��Ʒ����W�O� ��P�Vji�O[������Yb����/z�LY��nq9�L��;�M��~IVI�U�����w6D �҆�w{� ��@��{<��F��^M ��=��["��C2[���6W�������i���T�x���xZ�DqK ��=��+&<S���R%HiA�J2]F�[�GmUHL�oI8�)3G���H<��2[AC��տP�SV���������������������R�aER

0�MiSS21*) ��+i��$�*'��%�K�oH*��~��*��W2$��&P�*=v���*�)�l+$��;u�*2A���*�/P;%��6I+����*����%�$�(+Mi-�}*5-���$�?��C+9�Gi�*R���;$�U��S+2XYp�*^��b��U��2�~� 7G~��}�n|b�����j|JSYe��y 1�y֔��- �Q/?7 ��8��= �� ���O ! �e,.7��2 �+��#/�����&���~�oe$�*�ab��X���ŖP�Y"������K�z���1 ��W,��� �&�� L{��#�{څ��Ҩ�@� ��Wˆ����d��KS �}�}�i*ut� Y���M�pa ��%Q:� �”��\2GË �<�����<�Y����f��?CU���PW�i*�GeG����n��ŦI��Ë҈�0�|�q���V������;w*�TK���������:����U�F�!��r�q�C–'c�O~~�e *����>�m*���CŖ�������D�J*��-��D���a�w���� +���O����nq�����tb{� Œ�jw�U�]�9]��7�� *��'��­� *y�@pZ�*s�C{������������������O��+�E�C����?�Vľ]*F�@X�P:(��=j�������������;���������8�@�C�����l��s��|4�%��0����B�1�I�Cs�i ������Y����Zt������R M�C������R��VwՉ��:��*��4E�Ŷ��G7�&4�f���G�ޣ׊t����Z����Q���:����h0��:l01����1e[x81 M)�RB�C*ER

What is this?

vodvud commented 4 years ago

Hi!

It should be fingerprint template, but I have not idea how to pars it correct.

The $key can tell you each ID of finger registred. If you have not registered fingers then array $getFingerprint will be empty.

aice09 commented 4 years ago

Yes I check it sir i try that using user without fingerprint and it display empty. I hope this will be fix someday. :relaxed:

I also try this repo https://github.com/kamshory/ZKLibrary I get the same issue. :worried: