function gethostbyname6($host, $tryA = false)
{
    // get AAAA record for $host
    // if $try_a is true, if AAAA fails, it tries for A
    // the first match found is returned
    // otherwise returns false
    $dns = gethostbynamel6($host, $tryA);
    if ($dns == false) {
        return false;
    } else {
        return $dns[0];
    }
}
Exemple #2
0
function gethostbyname6($host, $try_a = TRUE)
{
    // get AAAA record for $host
    // if $try_a is true, if AAAA fails, it tries for A
    // the first match found is returned
    // otherwise returns FALSE
    $dns = gethostbynamel6($host, $try_a);
    if ($dns == FALSE) {
        return FALSE;
    } else {
        return $dns[0];
    }
}
Exemple #3
0
function gethostbyname6($host, $flags = OBS_DNS_ALL)
{
    // get AAAA record for $host
    // if flag OBS_DNS_A is set, if AAAA fails, it tries for A
    // the first match found is returned
    // otherwise returns FALSE
    $dns = gethostbynamel6($host, $flags);
    if ($dns == FALSE) {
        return FALSE;
    } else {
        return $dns[0];
    }
}