⚝
One Hat Cyber Team
⚝
Your IP:
216.73.216.1
Server IP:
185.238.29.86
Server:
Linux server2 6.8.12-6-pve #1 SMP PREEMPT_DYNAMIC PMX 6.8.12-6 (2024-12-19T19:05Z) x86_64
Server Software:
nginx/1.18.0
PHP Version:
8.1.31
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
var
/
www
/
shopware
/
vendor
/
true
/
punycode
/
View File Name :
README.md
# Punycode [](http://travis-ci.org/true/php-punycode) [](https://scrutinizer-ci.com/g/true/php-punycode/?branch=master) [](https://scrutinizer-ci.com/g/true/php-punycode/?branch=master) [](https://packagist.org/packages/true/punycode) A Bootstring encoding of Unicode for Internationalized Domain Names in Applications (IDNA). ## Install ``` composer require true/punycode:~2.0 ``` ## Usage ```php <?php // Import Punycode use TrueBV\Punycode; $Punycode = new Punycode(); var_dump($Punycode->encode('renangonçalves.com')); // outputs: xn--renangonalves-pgb.com var_dump($Punycode->decode('xn--renangonalves-pgb.com')); // outputs: renangonçalves.com ``` ## FAQ ### 1. What is this library for? This library converts a Unicode encoded domain name to a IDNA ASCII form and vice-versa. ### 2. Why should I use this instead of [PHP's IDN Functions](http://php.net/manual/en/ref.intl.idn.php)? If you can compile the needed dependencies (intl, libidn) there is not much difference. But if you want to write portable code between hosts (including Windows and Mac OS), or can't install PECL extensions, this is the right library for you.