Open Source Content Management Framework

mgd_list_hosts

  1. Description

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.<br>";  
     } else {  
       while( $list->fetch() ) {  
     echo $list->name . $list->prefix . ":" $list->port;  
       }  
     }  
    ?>

Note: list of hosts in other sitegroups is available only when authenticated as SiteGroup 0 admin user.

Designed by Nemein, hosted by Anykey