Comments (9)
3 questions : 1) Your data have special characters like Chinese, Arabic or something like that?. 2) did you use the parameter "encoding" when you get a TAD-PHP instance?. 3) can you send me the sample code you used?
from tad-php.
- I use simple Alphabetical characters while adding data into machine.
- I use this code while getting the instance of tad
$tad = (new TADFactory(['ip'=>'machine ip', 'com_key'=>0]))->get_instance();
- And use this for getting the user information from machine
$all_user_info = $tad->get_all_user_info()->to_array();
from tad-php.
My friend, it seems the XML response received from your device is invalid in someway. To be sure please copy, paste and run, as an alone script, the following PHP code and send to me the response generated:
<?php
$your_ip = 'xxx.xxx.xx.xx'; // Set here your device's ip
$options = array(
'location' => 'http://' . $your_ip . '/iWsService',
'uri' => 'http://www.zksoftware/Service/message/'
);
$client = new SoapClient(null, $options);
$soapRequest = "<GetAllUserInfo><ArgComKey>0</ArgComKey></GetAllUserInfo>";
$response = $client->__doRequest($soapRequest, 'http://' . $your_ip . '/iWsService', '', '1.1');
echo '<pre>', var_dump($response), '</pre>'; // Please copy the whole string generated here and send it to me
I hope I can find out where the problem is. It is a little complicated to help you because I don't have a device where I can run some tests.
from tad-php.
Here is the response which i get from machine according to your instructions
string(3342) "
110-Fatima Zaheer123450022221401060000
214-Hira Iqbal123450022299811429000
313-Momina Chaudhry123450032042511362000
416-Hashim Iqbal1234511482932321656000
512-Kashif Ali123450032210261253000
69-Zaheer Saeed12345003186861938000
717-Aurangzaib Nawaz123450022419471771000
818-Ali Mian123450022415631898000
919-Ahmad Hafeez12345003199085193000
1019-Ahmad Hafeez123450067891954000
1117-Aurangzaib Nawaz123450067326181773000
1220-weweweweee kkkiiikiikû†123400345552041000
1321-weweweweee kkkiiikiikm²123400456772124000
1421-weweweweee kkkiiikiik2 �123400678902180000
1520-edjdije ejdije12340083748922067000
1620-user 123450021474836472022000
1720-user 123450021474836472072000
"
from tad-php.
Well the response that you got from your device is obviously not well formed (according XML structure) and that's why you are getting the error:
Warning: SimpleXMLElement::__construct(): Entity: line 1: parser error : Input is not proper UTF-8, indicate encoding ! Bytes: 0xFB 0x86 0x3C 0x2F in C:\Program Files (x86)\xampp\htdocs\hrm\libraries\tad\lib\TADResponse.php on line 462
It's suppose your device should be return an XML response like the following:
<GetAllUserInfoResponse>
<Row>
<PIN>XXXXX</PIN>
<Name>XXXX</Name>
<Password>XXX</Password>
<Group>X</Group>
<Privilege>X</Privilege>
<Card>XXXX</Card>
<PIN2>XXXX</PIN2>
<TZ1>XXX</TZ1>
<TZ2>XXX</TZ2>
<TZ3>XXX</TZ3>
</Row>
<Row>
...
</Row>
</GetAllUserInfoResponse>
I have no idea why you are getting a not well-formed XML. Maybe is your device model (which I don't know what model you have, by the way). Maybe is the device's firmware version (TAD-PHP it's been tested on ZEM580, ZEM600 and few devices with ZEM800).
Sorry but at the moment I don't have any advice for you to solve this issue.
from tad-php.
Hi @ahmedali5530 the problem is how are you sending data, if you look at line: "1421-weweweweee kkkiiikiik2 �123400678902180000", you can see a "diamond" with a question mark inside, that is the problem on sending XML data and convert it.
I think the solution is send the data without that signs or symbols.
I hope this help you.
from tad-php.
Maybe I'm wrong my friend but I agree with @JohanMa4. I think the problem is related with your data in your device.
It would be nice if you can tell me what device's model you have (including the firmware version).
from tad-php.
Thanks @cobisja and @JohanMa4 for your suggestions, i deleted the users with different encoding and it worked.
By the way i m using Zkteco F18 machine.
from tad-php.
@cobisja @ahmedali5530 Thanks
from tad-php.
Related Issues (20)
- How to get the card (badge) capacity, stored and available count?
- Date Range Get Attendance HOT 5
- connection problem HOT 11
- Imposible conectar con el dispositivo - ZKTECO SF200 HOT 1
- Device soap connection doesn't allow storing of cards above 2147483647
- Connection Error
- Open Interface Through API
- Unable to start connection with device 92.168.*.*** HOT 4
- is there any way to get users count? HOT 1
- Cannot set soap port other than 80
- Fingerprint x100-x cant write template HOT 2
- Imposible iniciar conexión con dispositivo
- multiple set_user_info call issue
- Problem composer HOT 1
- set_user_info
- List of supported and test devices HOT 3
- How can i install TAD php on laravel?? HOT 3
- dump-autoload error
- this work for SC105 ZKteco ? HOT 1
- Update user's attendance time
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tad-php.