DNS API

Here is an example of the PHP code required to do a lookup.

Just change the value of $data['domain_name'] to the domain you want to lookup.

<?php

	$url					= 'https://auditdns.net/api/';
	$data['api_version']			= '1.0';
	$data['api_action']			= 'dns_report';
	$data['domain_name']			= 'example.com';

	$json_array = json_encode($data);
	$post_data = http_build_query(array('data' => $json_array));

	$options = array(
	   'http' => array(
	     'user_agent'  => 'DNS Report',
	     'timeout'  => 90,
	     'method'     => 'POST',
	     'header'     => 'Content-type: application/x-www-form-urlencoded',
	     'content'     => $post_data
	   )
	);


	$context    = stream_context_create($options);
	$result    = @file_get_contents($url, false, $context);
	$array     = json_decode($result, true);
	
	echo '<pre>';
	print_r($array);
	echo '</pre>';
?>