您好,欢迎来到三六零分类信息网!老站,搜索引擎当天收录,欢迎发信息

php实现window平台的checkdnsrr函数

2025/4/13 10:03:11发布17次查看
这篇文章主要介绍了php实现window平台的checkdnsrr函数,php的自带checkdnsrr函数只在linux平台有效,本文就模拟出了一个window下可以使用的checkdnsrr函数,需要的
php的自带checkdnsrr函数只在linux平台有效。使用惯了在window平台不能使用的话给兼容性带来麻烦。
因此写了个checkdnsrr模拟函数在window平台环境使用。
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; }}

该用户其它信息

VIP推荐

免费发布信息,免费发布B2B信息网站平台 - 三六零分类信息网 沪ICP备09012988号-2
企业名录 Product