Home > other >  How to use the code implements ping a nonexistent domain name, the program directly to return error
How to use the code implements ping a nonexistent domain name, the program directly to return error

Time:10-20

In code implementation:
In ping an error when a domain name, the local DNS server can return data, how to don't see the data, and display an error message directly, such as domain name does not exist, such as
Just add a judge? But how to distinguish whether the IP is the DNS server address?

CodePudding user response:

Wrong domain, for example?

.. Such as ___ ___ ___

This domain name, can also be as a domain name,

Feel unable to judge,

CodePudding user response:

Personal view:
Ping the domain name, if the domain name parameter specification you can't judge the existence of the domain name and use native code must pass the DNS
  • Related