|
@@ -62,6 +62,12 @@ function idn_to_puny($url) {
|
|
|
$parts = parse_url($url);
|
|
$parts = parse_url($url);
|
|
|
if (!empty($parts['host'])) {
|
|
if (!empty($parts['host'])) {
|
|
|
$idn = $parts['host'];
|
|
$idn = $parts['host'];
|
|
|
|
|
+ // INTL_IDNA_VARIANT_UTS46 is defined starting in PHP 5.4
|
|
|
|
|
+ if (defined('INTL_IDNA_VARIANT_UTS46')) {
|
|
|
|
|
+ $puny = idn_to_ascii($idn, 0, INTL_IDNA_VARIANT_UTS46);
|
|
|
|
|
+ } else {
|
|
|
|
|
+ $puny = idn_to_ascii($idn);
|
|
|
|
|
+ }
|
|
|
$puny = idn_to_ascii($idn);
|
|
$puny = idn_to_ascii($idn);
|
|
|
$pos = strpos($url, $idn);
|
|
$pos = strpos($url, $idn);
|
|
|
if ($pos !== false) {
|
|
if ($pos !== false) {
|