IDN Funktionen
PHP Manual

idn_to_ascii

(PHP 5 >= 5.3.0, PECL intl >= 1.0.2)

idn_to_asciiConvert domain name to IDNA ASCII form.

Beschreibung

Procedural style

string idn_to_ascii ( string $domain [, int $options ] )

This function converts Unicode domain name to IDNA ASCII-compatible format.

Parameter-Liste

domain

Domain to convert. In PHP 5 must be UTF-8 encoded.

options

Conversion options - combination of IDNA_* constants.

Rückgabewerte

Domain name encoded in ASCII-compatible form.

Beispiele

Beispiel #1 idn_to_ascii() example

<?php

echo idn_to_ascii('täst.de'); 

?>

Das oben gezeigte Beispiel erzeugt folgende Ausgabe:

xn--tst-qla.de

Siehe auch


IDN Funktionen
PHP Manual