I'm having trouble with my current web host's DNS server which doesn't correctly resolve IP addresses for Baidu.shell_exec('host -W 2 180.76.5.168');shell_exec('nslookup 180.76.5.168');Is there a way I can define my own DNS server address when trying to resolve the host?Quoted output of my localhost result...host: baiduspider-180-76-5-168.crawl.baidu.comServer: Wireless_Broadband_Router.home Address: 192.168.1.1 Name:  baiduspider-180-76-5-168.crawl.baidu.com Address: 180.76.5.168
Define custom DNS server when looking up host
dns;php
Is there a way I can define my own DNS server address when trying to  resolve the host?Yes, we can using following method .Method #1 - All Method trying to resolve from Google Public DNS, you can change as you wish.nslookup  180.76.5.168  8.8.8.8Method #2dig -x 180.76.5.168 @8.8.8.8Method #3host -W 2 180.76.5.168  8.8.8.8