| 123456789101112131415161718192021222324252627282930 |
- <?php
- namespace MGModule\DNSManager2\mgLibs\custom\helpers;
- use MGModule\DNSManager2\mgLibs\custom\dns\utils\IDNAConvert;
- class IdnaHelper
- {
- public static function idnaDecode($domain)
- {
- $idna = new IDNAConvert();
- return $idna->decode($domain);
- }
-
- public static function idnaEncode($domain)
- {
- $idna = new IDNAConvert();
- return $idna->encode($domain);
- }
-
- public static function isDomainIdn($domainName)
- {
- if(stripos($domainName, 'xn--') === 0)
- {
- return true;
- }
-
- return false;
- }
- }
|