wilkques/dns-tracer

v1.0.0 2025-04-11 02:26 UTC

This package is auto-updated.

Last update: 2025-04-11 02:28:56 UTC


README

Latest Stable Version License

Description

Use PHP to simulate the functionality of DNS tools like DIG or Nslookup

Installation

composer require wilkques/dns-tracer

How to use

$dnsTracer = new \Wilkques\DNS\DNSTracer;

$resolve = $dnsTracer->trace('<host name>', '<dns type>');

var_dump(
    $resolve
);

dns type

Type Extra Columns
A ip: An IPv4 address in dotted decimal notation.
MX pri: Priority of mail exchanger. Lower numbers indicate greater priority.
target: FQDN of the mail exchanger.
CNAME target: FQDN of location in DNS namespace to which the record is aliased.
NS target: FQDN of the name server which is authoritative for this hostname.
PTR target: Location within the DNS namespace to which this record points.
TXT txt: Arbitrary string data associated with this record.
HINFO cpu: IANA number designating the CPU of the machine referenced by this record.
os: IANA number designating the Operating System on the machine referenced by this record. See IANA's » Operating System Names for the meaning of these values.
CAA flags: A one-byte bitfield; currently only bit 0 is defined, meaning 'critical'; other bits are reserved and should be ignored.
tag: The CAA tag name (alphanumeric ASCII string).
value: The CAA tag value (binary string, may use subformats).For additional information See » RFC 6844.
SOA mname: FQDN of the machine from which the resource records originated.
rname: Email address of the administrative contact for this domain.
serial: Serial # of this revision of the requested domain.
refresh: Refresh interval (seconds) secondary name servers should use when updating remote copies of this domain.
retry: Length of time (seconds) to wait after a failed refresh before making a second attempt.
expire: Maximum length of time (seconds) a secondary DNS server should retain remote copies of the zone data without a successful refresh before discarding.
minimum-ttl: Minimum length of time (seconds) a client can continue to use a DNS resolution before it should request a new resolution from the server. Can be overridden by individual resource records.
AAAA ipv6: IPv6 address.
A6 masklen: Length (in bits) to inherit from the target specified by chain.
ipv6: Address for this specific record to merge with chain.
chain: Parent record to merge with ipv6 data.
SRV pri: (Priority) lowest priorities should be used first.
weight: Ranking to weight which of commonly prioritized targets should be chosen at random. target and port: hostname and port where the requested service can be found. For additional information see: » RFC 2782.
NAPTR order and pref: Equivalent to pri and weight above. flags, services, regex, and replacement: Parameters as defined by » RFC 2915.