Deploy Ladill Link / deploy (push) Successful in 37s
Add Bitly-style branded domain support via Ladill Domains SSL API, account analytics dashboard, settings page with default domain picker, and fix SSO/dashboard issues from QR Plus template leftovers. Co-authored-by: Cursor <cursoragent@cursor.com>
18 lines
379 B
PHP
18 lines
379 B
PHP
<?php
|
|
|
|
namespace App\Services\CustomDomain;
|
|
|
|
class DnsResolver
|
|
{
|
|
/** @return array<int,string> */
|
|
public function aRecords(string $host): array
|
|
{
|
|
$records = @dns_get_record($host, DNS_A);
|
|
if (! is_array($records)) {
|
|
return [];
|
|
}
|
|
|
|
return array_values(array_filter(array_map(fn ($r) => $r['ip'] ?? null, $records)));
|
|
}
|
|
}
|