IDN Forums - Internationalized Domain Names  
Home | Advertise on idnforums | Premium Membership

Go Back   IDN Forums - Internationalized Domain Names > IDN Discussions > General Discussion

General Discussion Feel free to talk about anything and everything in this board.

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 30th October 2005, 10:13 PM
bramiozo's Avatar
Administrator
 
Join Date: Sep 2005
Location: Haarlem
Posts: 2,251
iTrader: (30)
Rep Power: 972
bramiozo is on a distinguished roadbramiozo is on a distinguished roadbramiozo is on a distinguished roadbramiozo is on a distinguished roadbramiozo is on a distinguished roadbramiozo is on a distinguished road
Send a message via MSN to bramiozo Send a message via Skype™ to bramiozo
IDN-characters with php

I have a problem with IDN-characters in php.
I can enter utf-8 characters but they are not correctly translated when it is submitted to the whois-search.

Code:
if($ext=="com" || $ext=="net"||$ext=="org" || $ext=="COM" || $ext=="NET"||$ext=="ORG")
   	if(stristr($domein, "xn--")){$NICserver="whois.internic.net";$zoek="$domein.$ext";}
		 elseif(preg_match('/^[a-z0-9]+$/i',$domein)){$NICserver="whois.networksolutions.com";$zoek="$domein.$ext";}
            else
              {$NICserver="whois.internic.net";$zoek="$domein.$ext"; echo "$domein" ;}
Does anyone have any tips regarding IDN and PHP ?
Reply With Quote
  #2 (permalink)  
Old 30th October 2005, 10:31 PM
Rubber Duck's Avatar
Veteran
 
Join Date: Sep 2005
Location: Czech Republic (For those of you from USA = Chechnya)
Posts: 15,929
iTrader: (59)
Rep Power: 4551
Rubber Duck has a spectacular aura aboutRubber Duck has a spectacular aura aboutRubber Duck has a spectacular aura aboutRubber Duck has a spectacular aura aboutRubber Duck has a spectacular aura aboutRubber Duck has a spectacular aura aboutRubber Duck has a spectacular aura aboutRubber Duck has a spectacular aura aboutRubber Duck has a spectacular aura aboutRubber Duck has a spectacular aura aboutRubber Duck has a spectacular aura about
Re: IDN-characters with php

Quote:
Originally Posted by bramiozo
I have a problem with IDN-characters in php.
I can enter utf-8 characters but they are not correctly translated when it is submitted to the whois-search.

Code:
if($ext=="com" || $ext=="net"||$ext=="org" || $ext=="COM" || $ext=="NET"||$ext=="ORG")
   	if(stristr($domein, "xn--")){$NICserver="whois.internic.net";$zoek="$domein.$ext";}
		 elseif(preg_match('/^[a-z0-9]+$/i',$domein)){$NICserver="whois.networksolutions.com";$zoek="$domein.$ext";}
            else
              {$NICserver="whois.internic.net";$zoek="$domein.$ext"; echo "$domein" ;}
Does anyone have any tips regarding IDN and PHP ?

This is a bit over my head, but I do know that you can only Whois the punycode.

Best Regards
Dave Wrixon
__________________
All offers to sell are void.
Reply With Quote
  #3 (permalink)  
Old 31st October 2005, 10:30 AM
bramiozo's Avatar
Administrator
 
Join Date: Sep 2005
Location: Haarlem
Posts: 2,251
iTrader: (30)
Rep Power: 972
bramiozo is on a distinguished roadbramiozo is on a distinguished roadbramiozo is on a distinguished roadbramiozo is on a distinguished roadbramiozo is on a distinguished roadbramiozo is on a distinguished road
Send a message via MSN to bramiozo Send a message via Skype™ to bramiozo
Re: IDN-characters with php

That's unfortunate, are there any completely packages puny-code converters out there ? I mean, the converters must be tied to a database of some sort, do all the online converters link back to the same database or do they have their own database ?

Thanks .

Reply With Quote
  #4 (permalink)  
Old 31st October 2005, 01:09 PM
Rubber Duck's Avatar
Veteran
 
Join Date: Sep 2005
Location: Czech Republic (For those of you from USA = Chechnya)
Posts: 15,929
iTrader: (59)
Rep Power: 4551
Rubber Duck has a spectacular aura aboutRubber Duck has a spectacular aura aboutRubber Duck has a spectacular aura aboutRubber Duck has a spectacular aura aboutRubber Duck has a spectacular aura aboutRubber Duck has a spectacular aura aboutRubber Duck has a spectacular aura aboutRubber Duck has a spectacular aura aboutRubber Duck has a spectacular aura aboutRubber Duck has a spectacular aura aboutRubber Duck has a spectacular aura about
Re: IDN-characters with php

Quote:
Originally Posted by bramiozo
That's unfortunate, are there any completely packages puny-code converters out there ? I mean, the converters must be tied to a database of some sort, do all the online converters link back to the same database or do they have their own database ?

Thanks .

As far as I am aware, and to some extent I am guessing, but the punycode is simply Unicode put into an encoding algorythm and this is contained within the browser or the browser pluggin.

The Unicode is identified a number identifyer for each character which is generated by the keyboard stroke.

I think the source code for this is fairly short and widely available on the internet.

Best Regards
Dave Wrixon


__________________
All offers to sell are void.
Reply With Quote
  #5 (permalink)  
Old 31st October 2005, 03:12 PM
bramiozo's Avatar
Administrator
 
Join Date: Sep 2005
Location: Haarlem
Posts: 2,251
iTrader: (30)
Rep Power: 972
bramiozo is on a distinguished roadbramiozo is on a distinguished roadbramiozo is on a distinguished roadbramiozo is on a distinguished roadbramiozo is on a distinguished roadbramiozo is on a distinguished road
Send a message via MSN to bramiozo Send a message via Skype™ to bramiozo
Re: IDN-characters with php

Found it here :
http://phlymail.de/en/downloads/idna/download/

Reply With Quote
  #6 (permalink)  
Old 31st October 2005, 03:56 PM
bramiozo's Avatar
Administrator
 
Join Date: Sep 2005
Location: Haarlem
Posts: 2,251
iTrader: (30)
Rep Power: 972
bramiozo is on a distinguished roadbramiozo is on a distinguished roadbramiozo is on a distinguished roadbramiozo is on a distinguished roadbramiozo is on a distinguished roadbramiozo is on a distinguished road
Send a message via MSN to bramiozo Send a message via Skype™ to bramiozo
Re: IDN-characters with php

hmmm, only iso-8859-1 is supported((utf8_encode), the chinese characters and iso 8859-2..8859-16 need to be converted seperately.
Reply With Quote
  #7 (permalink)  
Old 31st October 2005, 04:10 PM
Rubber Duck's Avatar
Veteran
 
Join Date: Sep 2005
Location: Czech Republic (For those of you from USA = Chechnya)
Posts: 15,929
iTrader: (59)
Rep Power: 4551
Rubber Duck has a spectacular aura aboutRubber Duck has a spectacular aura aboutRubber Duck has a spectacular aura aboutRubber Duck has a spectacular aura aboutRubber Duck has a spectacular aura aboutRubber Duck has a spectacular aura aboutRubber Duck has a spectacular aura aboutRubber Duck has a spectacular aura aboutRubber Duck has a spectacular aura aboutRubber Duck has a spectacular aura aboutRubber Duck has a spectacular aura about
Re: IDN-characters with php

Quote:
Originally Posted by bramiozo
hmmm, only iso-8859-1 is supported((utf8_encode), the chinese characters and iso 8859-2..8859-16 need to be converted seperately.
<?

/*

Copyright (C) 2004 Owen Borseth - owen@name.com

See additional usage and copyright information at http://www.bluerider.com/idn/copyright.php.

*/

$prefix = "xn--";
$delim = "-";
$base = 36;
$tmin = 1;
$tmax = 26;
$skew = 38;
$damp = 700;
$initial_bias = 72;
$initial_n = 128;

function unicode_hexncr($text)
{
global $initial_n;

$text = utf8_to_unicode($text);
$return_array = array();

foreach($text as $codepoint)
{
if($codepoint >= $initial_n)
array_push($return_array, "&#x".dechex($codepoint).";");
else
array_push($return_array, chr($codepoint));
}

return($return_array);
}

function decode($text)
{
global $base, $tmin, $tmax, $skew, $damp, $initial_bias, $initial_n, $prefix, $delim;

$n = $initial_n;
$i = 0;
$bias = $initial_bias;
$output = array();

if(substr($text, 0, strlen($prefix)) != $prefix)
return($text);
else
$text = str_replace($prefix, "", $text);

$delim_pos = strrpos($text, $delim);

if($delim_pos !== false)
{
for($j = 0; $j < $delim_pos; $j++)
array_push($output, $text[$j]);
$text = substr($text, $delim_pos + 1);
}

for(; strlen($text) > 0
{
$oldi = $i;
$w = 1;

for($k = $base;1; $k = $k + $base)
{
$digit = decode_digit($text[0]);
$text = substr($text, 1);
$i = $i + $digit * $w;

$t = 0;
if($k <= $bias + $tmin)
$t = $tmin;
elseif($k >= $bias + $tmax)
$t = $tmax;
else
$t = $k - $bias;

if($digit < $t)
break;

$w = $w * ($base - $t);
}

$bias = adapt($i - $oldi, sizeof($output) + 1, $oldi == 0);
$n = $n + floor($i / (sizeof($output) + 1));
$i = $i % (sizeof($output) + 1);

$tmp = $output;
$output = array();

$j = 0;
for($j = 0; $j < $i; $j++)
array_push($output, $tmp[$j]);
array_push($output, unicode_to_utf8($n));
for($j = $j; $j < sizeof($tmp); $j++)
array_push($output, $tmp[$j]);

$i++;
}

return(implode($output));
}

function encode($text)
{
global $base, $tmin, $tmax, $skew, $damp, $initial_bias, $initial_n, $prefix, $delim;

$text = utf8_to_unicode($text);

$codecount = 0;
$basic_string = "";
$extended_string = "";

for ($i = 0; $i < sizeof($text); $i++)
{
if($text[$i] < $initial_n)
{
$basic_string .= chr($text[$i]);
$codecount++;
}
}

$n = $initial_n;
$delta = 0;
$bias = $initial_bias;
$h = $codecount;

while($h < sizeof($text))
{
$m = 100000;
for($j = 0; $j < sizeof($text); $j++)
{
if($text[$j] >= $n && $text[$j] <= $m)
{
$m = $text[$j];
}
}

$delta = $delta + ($m - $n) * ($h + 1);
$n = $m;

for($j = 0; $j < sizeof($text); $j++)
{
$c = $text[$j];

if($c < $n)
$delta++;
elseif($c == $n)
{
$q = $delta;
for($k = $base;1;$k = $k + $base)
{
$t = 0;
if($k <= $bias + $tmin)
$t = $tmin;
elseif($k >= $bias + $tmax)
$t = $tmax;
else
$t = $k - $bias;

if($q < $t)
break;

$extended_string .= encode_digit($t + (($q - $t) % ($base - $t)));
$q = floor(($q - $t) / ($base - $t));
}
$extended_string .= encode_digit($q);

$bias = adapt($delta, $h+1, $h==$codecount);
$delta = 0;
$h++;
}
}
$delta++;
$n++;
}

if(strlen($basic_string) > 0 && strlen($extended_string) < 1)
{
$encoded = $basic_string;
}
elseif(strlen($basic_string) > 0 && strlen($extended_string) > 0)
{
$encoded = $prefix.$basic_string.$delim.$extended_string;
}
elseif(strlen($basic_string) < 1 && strlen($extended_string) > 0)
{
$encoded = $prefix.$extended_string;
}

return($encoded);
}

function adapt($delta, $numpoints, $firsttime)
{
global $base, $tmin, $tmax, $skew, $damp;

if($firsttime)
$delta = floor($delta / $damp);
else
$delta = floor($delta / 2);

$delta = $delta + floor($delta / $numpoints);

$k = 0;
while($delta > floor((($base - $tmin) * $tmax) / 2))
{
$delta = floor($delta / ($base - $tmin));
$k = $k + $base;
}

return($k + (floor((($base - $tmin + 1) * $delta) / ($delta + $skew))));
}

/*

Function encode_digit and decode_digit were adapted from punycode.c, part of GNU Libidn.

http://www.gnu.org/software/libidn/d...8c-source.html

*/
function encode_digit($d)
{
return chr(($d + 22 + 75 * ($d < 26)));
}

function decode_digit($cp)
{
global $base;

$cp = ord($cp);
return ($cp - 48 < 10) ? $cp - 22 : (($cp - 65 < 26) ? $cp - 65 : (($cp - 97 < 26) ? $cp - 97 : $base));
}

/*

Copyright (C) 2002 Scott Reynen

Function utf8_to_unicode and unicode_to_utf8 was taken from an article titled "How to develop multilingual, Unicode
applications with PHP" at the following URL:

http://www.randomchaos.com/document....hp_and_unicode

*/
function unicode_to_utf8( $unicode )
{
$utf8 = '';

if ( $unicode < 128 )
{
$utf8.= chr( $unicode );
}
elseif ( $unicode < 2048 )
{
$utf8.= chr( 192 + ( ( $unicode - ( $unicode % 64 ) ) / 64 ) );
$utf8.= chr( 128 + ( $unicode % 64 ) );
}
else
{
$utf8.= chr( 224 + ( ( $unicode - ( $unicode % 4096 ) ) / 4096 ) );
$utf8.= chr( 128 + ( ( ( $unicode % 4096 ) - ( $unicode % 64 ) ) / 64 ) );
$utf8.= chr( 128 + ( $unicode % 64 ) );
}

return $utf8;
}

function utf8_to_unicode( $str )
{

$unicode = array();
$values = array();
$lookingFor = 1;

for ($i = 0; $i < strlen( $str ); $i++ )
{

$thisValue = ord( $str[ $i ] );

if ( $thisValue < 128 )
$unicode[] = $thisValue;
else
{

if ( count( $values ) == 0 )
$lookingFor = ( $thisValue < 224 ) ? 2 : 3;

$values[] = $thisValue;

if ( count( $values ) == $lookingFor )
{
$number = ( $lookingFor == 3 ) ?
( ( $values[0] % 16 ) * 4096 ) + ( ( $values[1] % 64 ) * 64 ) + ( $values[2] % 64 ):
( ( $values[0] % 32 ) * 64 ) + ( $values[1] % 64 );

$unicode[] = $number;
$values = array();
$lookingFor = 1;
}
}
}
return $unicode;
}

?>
__________________
All offers to sell are void.
Reply With Quote
  #8 (permalink)  
Old 31st October 2005, 05:51 PM
Veteran
 
Join Date: Sep 2005
Posts: 2,699
iTrader: (50)
Rep Power: 1289
gammascalper is on a distinguished roadgammascalper is on a distinguished roadgammascalper is on a distinguished roadgammascalper is on a distinguished roadgammascalper is on a distinguished roadgammascalper is on a distinguished road
Re: IDN-characters with php

Good find guys... I'll try to put up a bulk checker soon.
__________________
-----
Offers by e-mail, PM or forum post valid for 5 days
Reply With Quote
  #9 (permalink)  
Old 31st October 2005, 08:35 PM
bramiozo's Avatar
Administrator
 
Join Date: Sep 2005
Location: Haarlem
Posts: 2,251
iTrader: (30)
Rep Power: 972
bramiozo is on a distinguished roadbramiozo is on a distinguished roadbramiozo is on a distinguished roadbramiozo is on a distinguished roadbramiozo is on a distinguished roadbramiozo is on a distinguished road
Send a message via MSN to bramiozo Send a message via Skype™ to bramiozo
Re: IDN-characters with php

http://beginnerguides.com.server6.fi...omeincheck.php works with utf-8

It doesn't accept all characters yet.

I'll try iconv ( http://www.phpfreaks.com/phpmanual/p...ion.iconv.html ) for the other characters (standard in php 5) .


I have tried to implement the code you found Dw but it continuously says "Call to an undefined function: " .

some tools :
http://beginnerguides.com.server6.fi...-idn-tools.rar
Reply With Quote
  #10 (permalink)  
Old 31st October 2005, 09:32 PM
bramiozo's Avatar
Administrator
 
Join Date: Sep 2005
Location: Haarlem
Posts: 2,251
iTrader: (30)
Rep Power: 972
bramiozo is on a distinguished roadbramiozo is on a distinguished roadbramiozo is on a distinguished roadbramiozo is on a distinguished roadbramiozo is on a distinguished roadbramiozo is on a distinguished road
Send a message via MSN to bramiozo Send a message via Skype™ to bramiozo
Re: IDN-characters with php

It would offcourse be mighty fine if we could identify the charset.

determine_charset() doesn't seem to work and I can't find anything suitable on php.net.
Reply With Quote
  #11 (permalink)  
Old 1st November 2005, 10:55 AM
bramiozo's Avatar
Administrator
 
Join Date: Sep 2005
Location: Haarlem
Posts: 2,251
iTrader: (30)
Rep Power: 972
bramiozo is on a distinguished roadbramiozo is on a distinguished roadbramiozo is on a distinguished roadbramiozo is on a distinguished roadbramiozo is on a distinguished roadbramiozo is on a distinguished road
Send a message via MSN to bramiozo Send a message via Skype™ to bramiozo
Re: IDN-characters with php

Almost there, the correct punycode is produced for all characters, but the characters are not displayed correctly yet.
header("content-type: text/html; charset=UTF-8"); doesn't work
and the meta-equivalent doesn't work either, the encoding for the page is still set to iso-8859-1, does anyone have a solution for this ?
Reply With Quote
  #12 (permalink)  
Old 1st November 2005, 11:32 AM
Veteran
 
Join Date: Sep 2005
Posts: 2,699
iTrader: (50)
Rep Power: 1289
gammascalper is on a distinguished roadgammascalper is on a distinguished roadgammascalper is on a distinguished roadgammascalper is on a distinguished roadgammascalper is on a distinguished roadgammascalper is on a distinguished road
Re: IDN-characters with php

Quote:
Originally Posted by bramiozo
Almost there, the correct punycode is produced for all characters, but the characters are not displayed correctly yet.
header("content-type: text/html; charset=UTF-8"); doesn't work
and the meta-equivalent doesn't work either, the encoding for the page is still set to iso-8859-1, does anyone have a solution for this ?
Nice bramiozo -- works well except for this issue which Sedo also has problems with. Try putting this in your .htaccess:

CharsetSourceEnc utf-8
__________________
-----
Offers by e-mail, PM or forum post valid for 5 days
Reply With Quote
  #13 (permalink)  
Old 1st November 2005, 11:39 AM
bramiozo's Avatar
Administrator
 
Join Date: Sep 2005
Location: Haarlem
Posts: 2,251
iTrader: (30)
Rep Power: 972
bramiozo is on a distinguished roadbramiozo is on a distinguished roadbramiozo is on a distinguished roadbramiozo is on a distinguished roadbramiozo is on a distinguished roadbramiozo is on a distinguished road
Send a message via MSN to bramiozo Send a message via Skype™ to bramiozo
Re: IDN-characters with php

Haha I just found the .htaccess solution on the net, thanks anyway ;D .

Got it, it works fine now !

I'll translate it to english and then I will put up the code.


Reply With Quote
  #14 (permalink)  
Old 1st November 2005, 12:15 PM
bramiozo's Avatar
Administrator
 
Join Date: Sep 2005
Location: Haarlem
Posts: 2,251
iTrader: (30)
Rep Power: 972
bramiozo is on a distinguished roadbramiozo is on a distinguished roadbramiozo is on a distinguished roadbramiozo is on a distinguished roadbramiozo is on a distinguished roadbramiozo is on a distinguished road
Send a message via MSN to bramiozo Send a message via Skype™ to bramiozo
Re: IDN-characters with php

Removed ......

Last edited by bramiozo; 19th February 2006 at 12:42 PM..
Reply With Quote
  #15 (permalink)  
Old 1st November 2005, 12:27 PM
bramiozo's Avatar
Administrator
 
Join Date: Sep 2005
Location: Haarlem
Posts: 2,251
iTrader: (30)
Rep Power: 972
bramiozo is on a distinguished roadbramiozo is on a distinguished roadbramiozo is on a distinguished roadbramiozo is on a distinguished roadbramiozo is on a distinguished roadbramiozo is on a distinguished road
Send a message via MSN to bramiozo Send a message via Skype™ to bramiozo
Re: IDN-characters with php

Ah shit, the same problem again, when I changed the .htaccess it considers áll files as text files (it simply opened the 1.6 mb .rar files as if was .txt), therefore I changed lines in .htaccess to
AddCharset UTF-8 .html
AddCharset UTF-8 .php

The .rar files can now be downloaded but the site is again set at iso-8889-1.

Reply With Quote
  #16 (permalink)  
Old 1st November 2005, 12:31 PM
bramiozo's Avatar
Administrator
 
Join Date: Sep 2005
Location: Haarlem
Posts: 2,251
iTrader: (30)
Rep Power: 972
bramiozo is on a distinguished roadbramiozo is on a distinguished roadbramiozo is on a distinguished roadbramiozo is on a distinguished roadbramiozo is on a distinguished roadbramiozo is on a distinguished road
Send a message via MSN to bramiozo Send a message via Skype™ to bramiozo
Re: IDN-characters with php

OK finished (finally)

This did the trick :
AddDefaultCharset UTF-8

Reply With Quote
  #17 (permalink)  
Old 1st November 2005, 04:30 PM
Rubber Duck's Avatar
Veteran
 
Join Date: Sep 2005
Location: Czech Republic (For those of you from USA = Chechnya)
Posts: 15,929
iTrader: (59)
Rep Power: 4551
Rubber Duck has a spectacular aura aboutRubber Duck has a spectacular aura aboutRubber Duck has a spectacular aura aboutRubber Duck has a spectacular aura aboutRubber Duck has a spectacular aura aboutRubber Duck has a spectacular aura aboutRubber Duck has a spectacular aura aboutRubber Duck has a spectacular aura aboutRubber Duck has a spectacular aura aboutRubber Duck has a spectacular aura aboutRubber Duck has a spectacular aura about
Re: IDN-characters with php

Quote:
Originally Posted by bramiozo
Ah shit, the same problem again, when I changed the .htaccess it considers áll files as text files (it simply opened the 1.6 mb .rar files as if was .txt), therefore I changed lines in .htaccess to
AddCharset UTF-8 .html
AddCharset UTF-8 .php

The .rar files can now be downloaded but the site is again set at iso-8889-1.


Don't know whether this helps at all?

Dave Wrixon

<?

require("header.php");

?>

<table width="775">
<tr>
<td>

Also try <a href='index.php'>SINGLE</a> and <a href='bulk.php'>BULK</a> conversions.
<br>

<?

require("common_body.php");
require("punycode.php");

?>

<form action="index.php" method="post">
<b>Input</b><br>
<input type='text' name='text'><br><br>
<input type='radio' name='type' value='native' checked> Unicode -> Punycode<br>
<input type='radio' name='type' value='punycode'> Punycode -> Unicode<br><br>
<input type='submit' name='submit' value='submit'>
</form>
<br><br>

<?

$text = trim(strtolower($text));
$tld = strrchr($text, ".");

if($tld)
$text = str_replace($tld, "", $text);

if($text && $type == "native")
{
echo("<table border='1' cellpadding='0' bgcolor='#e2e2e2' width='100%'>");
echo("<tr><td colspan='2' bgcolor='#f9ff68'><b>Primary Info</b></td></tr>");
echo("<tr><td>Unicode Text:&nbsp;&nbsp;&nbsp;</td><td>".str_replace(" ", "&nbsp;", "$text$tld")."</td></tr>");
$hex_array = unicode_hexncr($text);
$text = encode($text);
echo("<tr><td>Punycode Text:&nbsp;&nbsp;&nbsp;</td><td><a href='http://www.domainsite.com/shopping_cart.php?domain=$text&amp;opttldarray[]=com&amp;opttldarray[]=net&amp;opttldarray[]=org&amp;opttldarray[]=biz' target='_blank'>".str_replace(" ", "&nbsp;", "$text$tld")."</a></td></tr>");
echo("</table><br>");

echo("<table border='0' cellpadding='0' bgcolor='#e2e2e2' width='100%'>");
echo("<tr><td colspan='2' bgcolor='#f9ff68'><b>Additional Info</b></td></tr>");
echo("<tr><td>Hex NCR's:&nbsp;&nbsp;&nbsp;</td><td><textarea cols='40'>");

foreach($hex_array as $hex)
{
echo(htmlentities("$hex"));
}

echo("$tld</textarea></td></tr>");
echo("</table><br>");

echo("<font size='-1'><b>hint</b> - you can display the Unicode on a webpage by pasting the hex NCR's into your HTML</font>");
echo("<br>");
}



elseif($text && $type == "punycode")
{
echo("<table border='0' cellpadding='0' bgcolor='#e2e2e2' width='100%'>");
echo("<tr><td colspan='2' bgcolor='#f9ff68'><b>Primary Info</b></td></tr>");
echo("<tr><td>Punycode Text:&nbsp;&nbsp;&nbsp;</td><td><a href='http://www.domainsite.com/shopping_cart.php?domain=$text&amp;opttldarray[]=com&amp;opttldarray[]=net&amp;opttldarray[]=org&amp;opttldarray[]=biz' target='_blank'>".str_replace(" ", "&nbsp;", "$text$tld")."</a></td></tr>");
$text = decode($text);
$hex_array = unicode_hexncr($text);
echo("<tr><td>Unicode Text:&nbsp;&nbsp;&nbsp;</td><td>".str_replace(" ", "&nbsp;", "$text$tld")."</td></tr>");
echo("</table><br>");

echo("<table border='0' cellpadding='0' bgcolor='#e2e2e2' width='100%'>");
echo("<tr><td colspan='2' bgcolor='#f9ff68'><b>Additional Info</b></td></tr>");
echo("<tr><td>Hex NCR's:&nbsp;&nbsp;&nbsp;</td><td><textarea cols='40'>");

foreach($hex_array as $hex)
{
echo(htmlentities("$hex"));
}

echo("$tld</textarea></td></tr>");
echo("</table><br>");

echo("<font size='-1'><b>hint</b> - you can display the Unicode on a webpage by pasting the hex NCR's into your HTML</font>");
echo("<br>");
}

echo("<font size='-1'><b>hint</b> - translate words at <a href='http://babelfish.altavista.com/'
target='_blank'>AltaVista</a> and then encode them here</font><br><br>");

?>

</td>

<td valign='top'>
<a href='http://www.domainsite.com' target='_blank'><img src='dsiteidn.png' border='0' alt='Register IDN domains at
www.domainsite.com'></a>
</td>
</tr>
</table>

<?

require("footer.php");

?>
__________________
All offers to sell are void.
Reply With Quote
  #18 (permalink)  
Old 1st November 2005, 05:54 PM
bramiozo's Avatar
Administrator
 
Join Date: Sep 2005
Location: Haarlem
Posts: 2,251
iTrader: (30)
Rep Power: 972
bramiozo is on a distinguished roadbramiozo is on a distinguished roadbramiozo is on a distinguished roadbramiozo is on a distinguished roadbramiozo is on a distinguished roadbramiozo is on a distinguished road
Send a message via MSN to bramiozo Send a message via Skype™ to bramiozo
Re: IDN-characters with php

Thanks for the aid Dw but the matter is pretty much resolved and I want to keep matters in my own hand so linking to an external source is not really an option (also with regard to the graphical output).

http://beginnerguides.com.server6.fi...comp-whois.rar

I am working on a script that you will all find very interesting, you'll see when I give you the link, have patience though .
Reply With Quote
  #19 (permalink)  
Old 1st November 2005, 06:13 PM
Rubber Duck's Avatar
Veteran
 
Join Date: Sep 2005
Location: Czech Republic (For those of you from USA = Chechnya)
Posts: 15,929
iTrader: (59)
Rep Power: 4551
Rubber Duck has a spectacular aura aboutRubber Duck has a spectacular aura aboutRubber Duck has a spectacular aura aboutRubber Duck has a spectacular aura aboutRubber Duck has a spectacular aura aboutRubber Duck has a spectacular aura aboutRubber Duck has a spectacular aura aboutRubber Duck has a spectacular aura aboutRubber Duck has a spectacular aura aboutRubber Duck has a spectacular aura aboutRubber Duck has a spectacular aura about
Re: IDN-characters with php

Quote:
Originally Posted by bramiozo
Thanks for the aid Dw but the matter is pretty much resolved and I want to keep matters in my own hand so linking to an external source is not really an option (also with regard to the graphical output).

http://beginnerguides.com.server6.fi...comp-whois.rar

I am working on a script that you will all find very interesting, you'll see when I give you the link, have patience though .
No worries. I have much more luck with Asian Languages than this gobbledegook!

Best Regards
Dave Wrixon
__________________
All offers to sell are void.
Reply With Quote
  #20 (permalink)  
Old 10th November 2005, 12:15 PM
bramiozo's Avatar
Administrator
 
Join Date: Sep 2005
Location: Haarlem
Posts: 2,251
iTrader: (30)
Rep Power: 972
bramiozo is on a distinguished roadbramiozo is on a distinguished roadbramiozo is on a distinguished roadbramiozo is on a distinguished roadbramiozo is on a distinguished roadbramiozo is on a distinguished road
Send a message via MSN to bramiozo Send a message via Skype™ to bramiozo
Re: IDN-characters with php

http://beginnerguides.com.server6.fi.../bulkpuny2.php

That puny-converter works, the bulk whois doesn't work just yet.


Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT. The time now is 12:03 AM.

Site Sponsors
Your ad here
buy t-shirt
מחיר הזהב

Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0
Copyright idnforums.com 2005

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54