i have written simple test page logins zabbix server using api provided in https://github.com/confirm-it-solutions/phpzabbixapi/releases
below code have written.
<?php // load zabbixapi require_once 'build/zabbixapi.class.php'; use zabbixapi\zabbixapi; try { // connect zabbix api $api = new zabbixapi('http://xxx.xxx.xxx/zabbix/', 'credit', 'debit','',''); /* ... stuff here ... */ } catch(exception $e) { echo"in exception <br/>"; // exception in zabbixapi catched echo $e->getmessage(); } ?> and below error getting. "in exception not decode json response"
thanks in advance.
you missing /api_jsonrpc.php in url.
Comments
Post a Comment