PHP code example of hypernic / nawala

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

    

hypernic / nawala example snippets



declare(strict_types=1);

header('Content-Type: application/json');
   // seconds
    'connect_timeout' => 5,   // seconds
    'retries' => 1,           // light retry for transient errors
    'cache' => [
        'enabled' => true
    ]
]);

$result = $nawala->check('example.com');
echo json_encode($result, JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE);
bash
./vendor/bin/phpunit --bootstrap vendor/autoload.php tests/test.php