Bug #80270 [Opn->Fbk]: dns_get_record returns duplicates and unexpected output
Edit report at https://bugs.php.net/bug.php?id=80270&edit=1
ID: 80270
Updated by: requinix@php.net
Reported by: ctskol09dw001 at gmail dot com
Summary: dns_get_record returns duplicates and unexpected
output
-Status: Open
+Status: Feedback
Type: Bug
Package: Network related
Operating System: Linux
PHP Version: Irrelevant
Block user comment: N
Private report: N
New Comment:
> Should return string as value field for TXT records
It does that in the "txt" field.
> Names of nameservers should be unique
They are in the output I'm seeing.
> and should be returning both IPV4 and IPV6 values
If you want addresses for the nameservers then do the DNS lookups for it.
> For Facebook.com dns_get_record () returns the following SOA records
Not for me.
Previous Comments:
------------------------------------------------------------------------
[2020-10-22 14:03:37] ctskol09dw001 at gmail dot com
Description:
------------
Issue 1 :- Expected behaviour :- Should return string as value field for TXT
records
Current Behaviour :- Array returned as value for TXT records
Issue 2 :- Expected behaviour :- Names of nameservers should be unique and
should be returning both IPV4 and IPV6 values
Current Behaviour :- Names of nameservers repeated several times and
no IPV4 or IPV6 values returned
Issue 3 :- For Facebook.com dns_get_record () returns the following SOA records multiple times which
are not shown by Google Dig tool ( https://toolbox.googleapps.com/apps/dig ) /
nslookup on windows :-
BODIS.com IN 984 SOA ns1.BODIS.com dnsadmin.BODIS.com 2017062202 10800 3600 1209600 3600
Test script:
---------------
<?php
$dns_result = dns_get_record ( "facebook.com" , DNS_ALL , $authns , $addtnl ) ;
try {
foreach ( $dns_result as $dns_result_key => $dns_result_value )
{ $rec = $dns_result_value ;
foreach ( $rec as $key => $value)
{ echo "$value  " ;
}
echo "<br>" ;
}
foreach ( $authns as $key_authns => $value_authns )
{ foreach ( $value_authns as $key_value_authns => $value_value_authns )
{ echo "$value_value_authns  " ;
}
echo "<br>" ;
}
}
catch ( Exception $e )
{
echo "$e->getMessage()" ;
}
?>
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=80270&edit=1
Thread (3 messages)