php - International Domain Names -
when navigate aртем.example.com
, web browser convert url xn--a-jtbvok.example.com
. there way convert xn--a-jtbvok
aртем
using php?
currently using $_server['http_host']
fetch requested url.
live examples here: aртем.lekintepls.se , åäö.lekintepls.se.
i have no idea phenomena called, i'm sorry if duplicate.
this notation called punycode or idna (internationalizing domain names in applications).
you can use idn_to_utf8 , idn_to_ascii convert between 2 notations.
Comments
Post a Comment