Tag Link | [DNS_Response] | Category | Utility |
---|---|---|---|
Type | Substitution | Source Available | Yes |
Support | Preferred | Version | 8.5 |
Change | New | Data Source | Any |
Output Type | DNS_Response | Security | None |
Implementation | LassoScript | Sets | Lasso 8.5 |
[DNS_Response] is a helper type which is used to format both DNS requests and responses. Normally a value of this type will only be returned from the [DNS_Lookup] tag when
The tag accepts a single parameter which is a byte stream of the DNS request or response to be formatted. The parsed response can then be displayed in several different formats depending on which member tag is used.
[DNS_Response->Answer] wil return an array of answers for most DNS responses. Address lookups or reverse lookups will return an array of IP addresses or host names. MX record lookups wil return an array of pairs each with a priority and an IP address. Other lookups may return an array of strings or other data.
[DNS_Response->Format] formats the DNS request or response so it user readable. This is a good choice for displaying the results of a DNS query to a site visitor since it will include the answer as well as supporting details like the DNS server queried.
[DNS_Response->BitFormat] formats the DNS request or response as low
[DNS_Response->Data] simply returns the data which was passed into the type. This tag is useful for getting either the raw request or response from the [DNS_Lookup] tag.
[Var: 'myDNSResponse' = (DNS_Lookup: 'www.example.com')]
[$myDNSResponse->Answer]
[$myDNSResponse->Format]
[$myDNSResponse->BitFormat]
[$myDNSResponse->Data]
No Parameters Required.
See the Lasso 8 Language Guide for examples of how to use this tag.