PHPackages                             danog/libdns-native - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Queues &amp; Workers](/categories/queues)
4. /
5. danog/libdns-native

ActiveLibrary[Queues &amp; Workers](/categories/queues)

danog/libdns-native
===================

Encoder/decoder for PHP's dns\_get\_record raw format based on libdns

0.1(6y ago)223MITPHPPHP &gt;=7.0CI failing

Since Jul 15Pushed 6y agoCompare

[ Source](https://github.com/danog/LibDNSNative)[ Packagist](https://packagist.org/packages/danog/libdns-native)[ Docs](https://github.com/danog/libdns-natie)[ RSS](/packages/danog-libdns-native/feed)WikiDiscussions master Synced 3d ago

READMEChangelog (1)Dependencies (3)Versions (2)Used By (0)

LibDNSNative
============

[](#libdnsnative)

[![Build Status](https://camo.githubusercontent.com/aa676204b450f3376e9429a7812058565d93ce9230b3a3e21bab2aaee517f1c8/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f64616e6f672f6c6962646e736e61746976652f6d61737465722e7376673f7374796c653d666c61742d737175617265)](https://travis-ci.org/danog/libdnsnative)[![License](https://camo.githubusercontent.com/942e017bf0672002dd32a857c95d66f28c5900ab541838c6c664442516309c8a/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d626c75652e7376673f7374796c653d666c61742d737175617265)](https://camo.githubusercontent.com/942e017bf0672002dd32a857c95d66f28c5900ab541838c6c664442516309c8a/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d626c75652e7376673f7374796c653d666c61742d737175617265)

Encoder/decoder for the raw format of [PHP's dns\_get\_record function](https://www.php.net/manual/en/function.dns-get-record.php) based on [libdns](https://github.com/DaveRandom/LibDNS/): allows usage of the function to fetch **all kinds of DNS records**, not just the ones supported by the `DNS_` constants.

The API consists of a `NativeEncoderFactory` that creates `NativeEncoder` objects, that can encode libdns `Message` objects to a list of parameters that that must be passed to the `dns_get_record` function.

The `NativeDecoderFactory` creates `NativeDecoder` objects, that accept the results of the `dns_get_record` function and decode them back to `Message` objects.

Installation
------------

[](#installation)

```
composer require danog/libdns-native

```

Usage
-----

[](#usage)

```
