コード例 #1
0
ファイル: fqdn.class.php プロジェクト: geldarr/hack-space
 /**
  * Check FQDN Validity
  *
  * @param $fqdn the FQDN to check
  *
  * @return true if the FQDN is valid
  **/
 static function checkFQDN($fqdn)
 {
     // The FQDN must be compose of several labels separated by dots '.'
     $labels = explode(".", $fqdn);
     foreach ($labels as $label) {
         if ($label == "" || !FQDNLabel::checkFQDNLabel($label)) {
             return false;
         }
     }
     return true;
 }