mirror of
https://github.com/getnamingo/registry.git
synced 2025-07-21 01:55:59 +02:00
Update escrow.php
This commit is contained in:
parent
bf84eda8b2
commit
89ea2432df
1 changed files with 15 additions and 1 deletions
|
@ -251,7 +251,21 @@ try {
|
|||
$xml->writeAttribute('s', 'ok');
|
||||
$xml->text('ok');
|
||||
$xml->endElement(); // Closing rdeHost:status
|
||||
|
||||
|
||||
if (implode('.', array_slice(explode('.', $host['name']), -count(explode('.', ltrim($tld['tld'], '.'))))) === ltrim($tld['tld'], '.')) {
|
||||
// Fetch and add addresses
|
||||
$stmtAddr = $dbh->prepare("SELECT addr, ip FROM host_addr WHERE host_id = :host_id");
|
||||
$stmtAddr->execute([':host_id' => $host['id']]);
|
||||
$addresses = $stmtAddr->fetchAll();
|
||||
|
||||
foreach ($addresses as $address) {
|
||||
$xml->startElement('rdeHost:addr');
|
||||
$xml->writeAttribute('ip', $address['ip']); // v4 or v6
|
||||
$xml->text($address['addr']);
|
||||
$xml->endElement(); // Closing rdeHost:addr
|
||||
}
|
||||
}
|
||||
|
||||
$xml->writeElement('rdeHost:clID', getClid($dbh, $host['clid']));
|
||||
$xml->writeElement('rdeHost:crRr', getClid($dbh, $host['crid']));
|
||||
$crDate = DateTime::createFromFormat('Y-m-d H:i:s.v', $host['crdate']);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue