Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/daniesy/php-digger
Fetch DNS Resource Records associated with a hostname
https://github.com/daniesy/php-digger
composer dig dns php
Last synced: about 4 hours ago
JSON representation
Fetch DNS Resource Records associated with a hostname
- Host: GitHub
- URL: https://github.com/daniesy/php-digger
- Owner: daniesy
- License: gpl-3.0
- Created: 2019-08-09T13:24:49.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2020-02-07T02:38:26.000Z (over 4 years ago)
- Last Synced: 2024-09-20T06:13:12.901Z (about 2 months ago)
- Topics: composer, dig, dns, php
- Language: PHP
- Size: 34.2 KB
- Stars: 5
- Watchers: 2
- Forks: 2
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# DIGGER [![Build Status](https://travis-ci.org/daniesy/php-digger.svg?branch=master)](https://travis-ci.org/daniesy/php-digger)
A simple way to fetch DNS Resource Records associated with a hostname.
### 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";
}### Installation
You can install `Digger` with composer by running the following command.
`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.