1. Go to this page and download the library: Download jeeven/dnslookup library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
use Jeeven\DnsLookup\Facades\DnsLookup;
// Individual record types — each returns a clean array of records
DnsLookup::a('jeevenlamichhane.com.np');
DnsLookup::aaaa('jeevenlamichhane.com.np');
DnsLookup::mx('jeevenlamichhane.com.np');
DnsLookup::ns('jeevenlamichhane.com.np');
DnsLookup::txt('jeevenlamichhane.com.np');
DnsLookup::cname('www.jeevenlamichhane.com.np');
DnsLookup::soa('jeevenlamichhane.com.np');
DnsLookup::caa('jeevenlamichhane.com.np');
DnsLookup::exists('jeevenlamichhane.com.np'); // true/false (NXDOMAIN check)
DnsLookup::status('jeevenlamichhane.com.np'); // raw DNS response status code (0 = NOERROR)
use Jeeven\DnsLookup\DnsLookup;
class DomainController extends Controller
{
public function show(DnsLookup $dns, string $domain)
{
return $dns->all($domain);
}
}