$ record = new NSEC3PARAM ([
'host ' => "bluelibraries.com " ,
'ttl ' => 3600 ,
'value ' => "nsec3param-value " ,
'algorithm ' => 12 ,
'flags ' => 255 ,
'iterations ' => 3 ,
'salt ' => "salt== "
]);
echo 'getHost = ' . $ record ->getHost () . PHP_EOL ;
echo 'getTtl = ' . $ record ->getTtl () . PHP_EOL ;
echo 'getClass = ' . $ record ->getClass () . PHP_EOL ;
echo 'getTypeName = ' . $ record ->getTypeName () . PHP_EOL ;
echo 'getAlgorithm = ' . $ record ->getAlgorithm () . PHP_EOL ;
echo 'getFlags = ' . $ record ->getFlags () . PHP_EOL ;
echo 'getIterations = ' . $ record ->getIterations () . PHP_EOL ;
echo 'getSalt = ' . $ record ->getSalt () . PHP_EOL ;
getHost = bluelibraries.com
getTtl = 3600
getClass = IN
getTypeName = NSEC3PARAM
getAlgorithm = 12
getFlags = 255
getIterations = 3
getSalt = salt==
$ record = new NSEC3PARAM ();
$ record ->setData ([
'host ' => "bluelibraries.com " ,
'ttl ' => 3600 ,
'value ' => "nsec3param-value " ,
'algorithm ' => 12 ,
'flags ' => 255 ,
'iterations ' => 3 ,
'salt ' => "salt== "
]);
echo 'getHost = ' . $ record ->getHost () . PHP_EOL ;
echo 'getTtl = ' . $ record ->getTtl () . PHP_EOL ;
echo 'getClass = ' . $ record ->getClass () . PHP_EOL ;
echo 'getTypeName = ' . $ record ->getTypeName () . PHP_EOL ;
echo 'getAlgorithm = ' . $ record ->getAlgorithm () . PHP_EOL ;
echo 'getFlags = ' . $ record ->getFlags () . PHP_EOL ;
echo 'getIterations = ' . $ record ->getIterations () . PHP_EOL ;
echo 'getSalt = ' . $ record ->getSalt () . PHP_EOL ;
getHost = bluelibraries.com
getTtl = 3600
getClass = IN
getTypeName = NSEC3PARAM
getAlgorithm = 12
getFlags = 255
getIterations = 3
getSalt = salt==
$ record = Record::fromString ('bluelibraries.com 3600 IN NSEC3PARAM 12 255 3 salt== ' );
echo 'getHost = ' . $ record ->getHost () . PHP_EOL ;
echo 'getTtl = ' . $ record ->getTtl () . PHP_EOL ;
echo 'getClass = ' . $ record ->getClass () . PHP_EOL ;
echo 'getTypeName = ' . $ record ->getTypeName () . PHP_EOL ;
echo 'getAlgorithm = ' . $ record ->getAlgorithm () . PHP_EOL ;
echo 'getFlags = ' . $ record ->getFlags () . PHP_EOL ;
echo 'getIterations = ' . $ record ->getIterations () . PHP_EOL ;
echo 'getSalt = ' . $ record ->getSalt () . PHP_EOL ;
getHost = bluelibraries.com
getTtl = 3600
getClass = IN
getTypeName = NSEC3PARAM
getAlgorithm = 12
getFlags = 255
getIterations = 3
getSalt = salt==
Create from initialized array
$ record = Record::fromNormalizedArray ([
'host ' => "bluelibraries.com " ,
'ttl ' => 3600 ,
'value ' => "nsec3param-value " ,
'algorithm ' => 12 ,
'flags ' => 255 ,
'iterations ' => 3 ,
'salt ' => "salt== " ,
'type ' => "NSEC3PARAM "
]);
echo 'getHost = ' . $ record ->getHost () . PHP_EOL ;
echo 'getTtl = ' . $ record ->getTtl () . PHP_EOL ;
echo 'getClass = ' . $ record ->getClass () . PHP_EOL ;
echo 'getTypeName = ' . $ record ->getTypeName () . PHP_EOL ;
echo 'getAlgorithm = ' . $ record ->getAlgorithm () . PHP_EOL ;
echo 'getFlags = ' . $ record ->getFlags () . PHP_EOL ;
echo 'getIterations = ' . $ record ->getIterations () . PHP_EOL ;
echo 'getSalt = ' . $ record ->getSalt () . PHP_EOL ;
getHost = bluelibraries.com
getTtl = 3600
getClass = IN
getTypeName = NSEC3PARAM
getAlgorithm = 12
getFlags = 255
getIterations = 3
getSalt = salt==
$ records = DNS ::getRecords ('bluelibraries.com ' , RecordTypes::NSEC3PARAM );
print_r ($ records );
Array
(
[0] => BlueLibraries\Dns\Records\Types\DnsSec\NSEC3PARAM Object
(
[data:protected] => Array
(
[host] => bluelibraries.com
[ttl] => 3600
[value] => nsec3param-value
[algorithm] => 12
[flags] => 255
[iterations] => 3
[salt] => salt==
[type] => NSEC3PARAM
[class] => IN
)
)
)
$ dns = new DnsRecords ();
$ records = $ dns ->get ('bluelibraries.com ' , RecordTypes::NSEC3PARAM );
print_r ($ records );
Array
(
[0] => BlueLibraries\Dns\Records\Types\DnsSec\NSEC3PARAM Object
(
[data:protected] => Array
(
[host] => bluelibraries.com
[ttl] => 3600
[value] => nsec3param-value
[algorithm] => 12
[flags] => 255
[iterations] => 3
[salt] => salt==
[type] => NSEC3PARAM
[class] => IN
)
)
)
Retrieve without helper, using custom handler settings
$ dnsHandler = new TCP ();
$ dnsHandler ->setRetries (2 );
$ dnsHandler ->setTimeout (3 );
$ dnsHandler ->setNameserver ('8.8.8.8 ' );
$ dns = new DnsRecords ($ dnsHandler );
$ records = $ dns ->get ('bluelibraries.com ' , RecordTypes::NSEC3PARAM );
print_r ($ records );
Array
(
[0] => BlueLibraries\Dns\Records\Types\DnsSec\NSEC3PARAM Object
(
[data:protected] => Array
(
[host] => bluelibraries.com
[ttl] => 3600
[value] => nsec3param-value
[algorithm] => 12
[flags] => 255
[iterations] => 3
[salt] => salt==
[type] => NSEC3PARAM
[class] => IN
)
)
)
$ record = new NSEC3PARAM ([
'host ' => "bluelibraries.com " ,
'ttl ' => 3600 ,
'value ' => "nsec3param-value " ,
'algorithm ' => 12 ,
'flags ' => 255 ,
'iterations ' => 3 ,
'salt ' => "salt== "
]);
echo 'string1 = ' . json_encode ($ record ->toString ()) . PHP_EOL ;
echo 'string2 = ' . json_encode ((string )$ record ) . PHP_EOL ;
string1 = "bluelibraries.com 3600 IN NSEC3PARAM 12 255 3 salt=="
string2 = "bluelibraries.com 3600 IN NSEC3PARAM 12 255 3 salt=="
$ record = new NSEC3PARAM ([
'host ' => "bluelibraries.com " ,
'ttl ' => 3600 ,
'value ' => "nsec3param-value " ,
'algorithm ' => 12 ,
'flags ' => 255 ,
'iterations ' => 3 ,
'salt ' => "salt== "
]);
echo 'JSON = ' . json_encode ($ record ) . PHP_EOL ;
JSON = {"host":"bluelibraries.com","ttl":3600,"value":"nsec3param-value","algorithm":12,"flags":255,"iterations":3,"salt":"salt==","class":"IN","type":"NSEC3PARAM"}
$ record = new NSEC3PARAM ([
'host ' => "bluelibraries.com " ,
'ttl ' => 3600 ,
'value ' => "nsec3param-value " ,
'algorithm ' => 12 ,
'flags ' => 255 ,
'iterations ' => 3 ,
'salt ' => "salt== "
]);
print_r ($ record ->toArray ());
Array
(
[host] => bluelibraries.com
[ttl] => 3600
[value] => nsec3param-value
[algorithm] => 12
[flags] => 255
[iterations] => 3
[salt] => salt==
[class] => IN
[type] => NSEC3PARAM
)