PHP有内置的替代exec("nslookup")吗?

Mem*_*nes 4 php shell

我的PHP类中有以下命令:

@exec('nslookup -type=' . $type . ' ' . escapeshellcmd($host), $output);
Run Code Online (Sandbox Code Playgroud)

由于安全限制(exec并且escapeshellcmd从php.ini禁用),这不会在我的服务器上运行.有没有不依赖的替代方案exec

Che*_*ery 5

你可以使用dns_get_record():

http://www.php.net/dns_get_record