Skip to content

Instantly share code, notes, and snippets.

@manoot
Created January 26, 2012 17:59
Show Gist options
  • Save manoot/1684053 to your computer and use it in GitHub Desktop.
Save manoot/1684053 to your computer and use it in GitHub Desktop.
ZabbixAPI::debugEnabled(TRUE);
ZabbixAPI::login($z_server,$z_user,$z_pass)
or die('Unable to login: '.print_r(ZabbixAPI::getLastError(),true));
$hosts = ZabbixAPI::fetch_array('host','get',array('host'=>$site))
or die('Unable to get hostids: '.print_r(ZabbixAPI::getLastError(),true));
echo "Hosts: ".print_r($hosts, true)."\n<br>";
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment