PHP code example of fhferreira / php-dig

1. Go to this page and download the library: Download fhferreira/php-dig 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/ */

    

fhferreira / php-dig example snippets


$client = new Hostinger\DigClient();
$result = $client->getRecord('hostinger.com', DNS_MX);

dns_get_record('hostinger.com', DNS_MX);

$client = new Hostinger\DigClient();
$logger = new \Monolog\Logger\Logger('App');
$logger->pushHandler(new StreamHandler('path/to/your.log'));
$client->setLogger($logger);