Hi friends, I need to make my Own web portal, PHP files going to stay in the same server with the original frontend zabbix PHP, I can create a Host but I like to show the error message when is not possible to create a host, can anyone help me please?
Thanks a lot
PHP Code:
require_once('./include/config.inc.php');
$hostgroup = array('name' => 'grupoprueba4555');
DBstart();
$result = API::HostGroup()->create($hostgroup);
if ($result['groupids'][0]){
echo "OK: HOSTGROUP AGREGADO CORRECTAMENTE:";
echo $result['groupids'][0];
}
else{
echo "ERROR: HOSTGROUP NO AGREGADO";
echo $result['code'][0];
}
$result = DBend($result);
Comment