From a5733c99057e611d878023be3db4e8342301957e Mon Sep 17 00:00:00 2001 From: Rod Elias Date: Thu, 6 Feb 2020 23:37:36 -0300 Subject: [PATCH] formatting README.md --- README.md | 38 +++++++++++++++++++++----------------- 1 file changed, 21 insertions(+), 17 deletions(-) diff --git a/README.md b/README.md index ad0a54c..01bcdee 100644 --- a/README.md +++ b/README.md @@ -2,35 +2,39 @@ A simple way to fetch DNS Resource Records associated with a hostname. -### How to +## How to Using digger is easy as 1, 2, 3. - getRecords('ping-pong.dev', 'A'); - foreach($records as $record) { - var_dump($record); - } - - if($records->has('127.0.0.1')) { - echo "The dns record is set"; - } +$records = (new Digger)->getRecords('ping-pong.dev', 'A'); +foreach($records as $record) { + var_dump($record); +} -### Installation +if($records->has('127.0.0.1')) { + echo "The dns record is set"; +} +``` -You can install `Digger` with composer by running the following command. +## Installation -`composer require daniesy/php-digger:dev-master` +You can install `Digger` with composer by running the following command: -### Parameters +```bash +composer require daniesy/php-digger:dev-master +``` + +## Parameters - **host** The host you want to fetch the DNS records from - **type** The type of DNS Records you want to get. At the moment, only the following records are supported: `A`, `AAAA`, `CAA`, `CNAME`, `MX`, `NS`, `PTR`, `SOA`, `SRV`, `TXT`. I'll add more at a later point. - **timeout** - The timeout in seconds after which the call should fail. The default timeout is `5` seconds. \ No newline at end of file + The timeout in seconds after which the call should fail. The default timeout is `5` seconds.