diff options
Diffstat (limited to 'phpBB/includes/functions.php')
| -rw-r--r-- | phpBB/includes/functions.php | 18 | 
1 files changed, 7 insertions, 11 deletions
| diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php index 026496bfb3..36f5093e1f 100644 --- a/phpBB/includes/functions.php +++ b/phpBB/includes/functions.php @@ -3406,13 +3406,14 @@ function phpbb_checkdnsrr($host, $type = '')  {  	$type = (!$type) ? 'MX' : $type; -	if (DIRECTORY_SEPARATOR == '\\') +	// Call checkdnsrr() if available. This is also the case on Windows with PHP 5.3 or later. +	if (function_exists('checkdnsrr')) +	{ +		// The dot indicates to search the DNS root (helps those having DNS prefixes on the same domain) +		return checkdnsrr($host . '.', $type); +	} +	else if (DIRECTORY_SEPARATOR == '\\' && function_exists('exec'))  	{ -		if (!function_exists('exec')) -		{ -			return NULL; -		} -  		// @exec('nslookup -retry=1 -timout=1 -type=' . escapeshellarg($type) . ' ' . escapeshellarg($host), $output);  		@exec('nslookup -type=' . escapeshellarg($type) . ' ' . escapeshellarg($host) . '.', $output); @@ -3438,11 +3439,6 @@ function phpbb_checkdnsrr($host, $type = '')  		return false;  	} -	else if (function_exists('checkdnsrr')) -	{ -		// The dot indicates to search the DNS root (helps those having DNS prefixes on the same domain) -		return (checkdnsrr($host . '.', $type)) ? true : false; -	}  	return NULL;  } | 
