mirror of
https://github.com/maelgangloff/domain-watchdog.git
synced 2025-12-29 16:15:04 +00:00
feat: add support for punycode tld
This commit is contained in:
@@ -46,10 +46,11 @@ class RDAPService
|
|||||||
|
|
||||||
public function registerDomain(string $fqdn): Domain
|
public function registerDomain(string $fqdn): Domain
|
||||||
{
|
{
|
||||||
$rdapServer = $this->getRDAPServer(RDAPService::getTld($fqdn));
|
$idnDomain = idn_to_ascii($fqdn);
|
||||||
|
$rdapServer = $this->getRDAPServer(RDAPService::getTld($idnDomain));
|
||||||
|
|
||||||
$res = $this->client->request(
|
$res = $this->client->request(
|
||||||
'GET', $rdapServer . 'domain/' . $fqdn
|
'GET', $rdapServer . 'domain/' . $idnDomain
|
||||||
)->toArray();
|
)->toArray();
|
||||||
|
|
||||||
$domain = $this->domainRepository->findOneBy(["ldhName" => strtolower($res['ldhName'])]);
|
$domain = $this->domainRepository->findOneBy(["ldhName" => strtolower($res['ldhName'])]);
|
||||||
|
|||||||
Reference in New Issue
Block a user