PHP code example of mabrahamde / idna-converter

1. Go to this page and download the library: Download mabrahamde/idna-converter library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

mabrahamde / idna-converter example snippets



		$idn = new \idna_convert(array('idn_version' => 2008));

	echo $idn->encode('lübeck.de'); // prints 'xn--lbeck-kva.de'

	echo $idn->decode('xn--lbeck-kva.de') // prints 'lübeck.de'