This article describes how to implement the checkdnsrr function of the window platform in php. the built-in checkdnsrr function of PHP is only valid on the linux platform. This article simulates the checkdnsrr function that can be used in a window.
This article describes how to implement the checkdnsrr function of the window platform in php. the built-in checkdnsrr function of PHP is only valid on the linux platform. This article simulates the checkdnsrr function that can be used in a window.
PHP's built-in checkdnsrr function is only valid on the linux platform. It makes compatibility troublesome if it is not used on the window platform.
Therefore, a checkdnsrr simulation function is written for use in the Windows platform environment.
If (! Function_exists ('checkdnsrr') {function checkdnsrr ($ host, $ type) {if (! Empty ($ host )&&! Empty ($ type) {@ exec ('nslookup-type = '. escapeshellarg ($ type ). ''. escapeshellarg ($ host), $ output); foreach ($ output as $ k => $ line) {if (eregi ('^ '. $ host, $ line) {return true ;}} return false ;}}
,