1. Go to this page and download the library: Download ngfw/dnsdumpster 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/ */
ngfw / dnsdumpster example snippets
use Illuminate\Support\Facades\App;
$dnsDumpster = App::make('DNSDumpster');
// or
$dnsDumpster = resolve('DNSDumpster');
// Use the service
$data = $dnsDumpster->fetchData('gm-sunshine.com');
namespace App\Http\Controllers;
use Ngfw\DNSDumpster\DNSDumpster;
use Illuminate\Http\JsonResponse;
class DomainController extends Controller
{
private DNSDumpster $dnsDumpster;
public function __construct(DNSDumpster $dnsDumpster)
{
$this->dnsDumpster = $dnsDumpster;
}
public function lookup(string $domain): JsonResponse
{
$data = $this->dnsDumpster->fetchData($domain);
return response()->json($data);
}
}