Question

I'm creating a dns-overview after you input a domainname. I get my information by using:

    $dnsinfo = (dns_get_record($_POST['txtdomein'], DNS_ANY));

After I get the information I want to check if the nameservers and mail servers etc. are responding. So i have to request a response. How do i do that with php?

Greetz

Était-ce utile?

La solution

question is solved.

i'm now using:

`$fp = socket_create(AF_INET, SOCK_DGRAM, SOL_UDP)or die('Error: socket_create');

//connect to the socket
socket_connect($fp, $nameserver, 53) or die('Error: socket_connect');

if($fp)
{
    //write the package to socket $fp
    socket_write($fp, $package);
    $output = '';

    //get the response from the socket
        $output = socket_read($fp, 1024, PHP_BINARY_READ)or die('Error: socket_read');
      echo $output."<br />";`

Thx for the support sberry:)

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top