mgd_list_hosts

(Midgard 1.4.2 'Bifrost')

mgd_list_hosts -- List midgard hosts

Description

mgd_list_hosts (void)

Minimum version: Midgard 1.2.5 (Mad King)

Lists all midgard hosts within the sitegroup.

Returns an object traversable by calling fetch() if successful. Returns FALSE on failure.


<?php
 $list = mgd_list_hosts();
 if( $list->N == 0 ) {
   echo "No hosts found.&lt;br>";
 } else {
   while( $list->fetch() ) {
 echo $list->name . $list->prefix . ":" $list->port;
   }
 }
?>