This is the PHP(4) API for the GNU LibIDN software made by Simon Josefsson.
It's intention is to have international characters in the DNS system.
See more about the library at Josefsson LibIDN page.

To checkout the code, execute the following two lines after each other. As of version 0.7 (which will be released
later today Jan 12, 2004), PHP-IDN can be made externaly from the PHP sources. Just check it out (or unpack the
distribution tarball, see below) in a directory of your choice.

Don't throw critical error if php-idn can't convert from one string to another.

Update 20060105:

Fixed GCC 4.1 compiler warnings. Thanx to Robert Scheck. This fix only in HEAD though!

Update 20041218:

Support building on PHP5 using the ZEND_ENGINE_2 define (if defined => PHP5).

This because OnUpdateInt was removed in favor of OnUpdateLong.

Missing PHP parser code added in idn.php.

Some slight updates to README.documentation on how to build the reference documentation

Update 20040426:

Support TLD checking (patch by Thomas Jacob)

Show version of LibIDN and configuration values when dumping info.

Lots of other small bugfixes that mainly solves the memory problem (patches by Thomas Jacob)

Cleanup and rewrite of example PHP page

Update 20040204:
Thanx to Thomas Jacob for sending patches that fixes some more memory management issues still left from 0.8.

Update 20040130:
Thanx to Sascha Kettler for sending patches that fixes PHP threading error(s) and memory leaks. Thease patches are
included in the current version - version 0.8.

Update 20040113:
It is now possible to compile the PHP-IDN module separate from the PHP source tree.
This is possible using phpize (distibuted and built from the PHP source).
Also, since 0.7, there's also a Debian GNU/Linux package.
Currently, only the i386 package exists prebuilt, but you can download the source files,
and rebuild your own (using dpkg-source and debuild commands).

Update 20031109:
The API have been finalized. It's quite different from version 0.2 above, so make sure you don't use that. Here's
version 0.4. Look at the included test script in 'tests/idn.php' on how to use it
(the IDNA converter referenced above always use the very latest API).
The 0.4 version also includes the rudimentary framework for an API reference. The idea is to have PHP-IDN included
in PHP, so hoppfully this API reference will be located at the php.net site...
To check that the module is loaded, use THIS code (not the one above!)

if(function_exists("idn_to_ascii")) {
echo "idn exists";
}

Update 20031107:
Have been testing and updating the module during the day, now it works almost perfect! I still have some
memory leeks. Or if it's the combination of Apache and PHP as described on the following URL's:
http://bugs.debian.org/206414 and bugs.debian.org/205592. I don't know at the moment, but I'll try to find out...
I have a preliminary tarball for you to test out. See above to get it compiled...
Also have a look at MY version of the IDNA converter. If it can't
convert the value (you get an error) or you don't get a reply in a timely manner, try reloading the page a
couple of times (Apache probably crashed).
Note that my IDNA converter is very limited because all functionality haven't been tested, but I'm working on it...

Update 20031106:
The module compiled just niceley (after discovering that I had to use options to the --with-idn parameter).
Some simple test code verified that the module was loaded and worked.

if(function_exists("idn_unicode_to_ascii")) {
echo "idn exists";
}

I will now start testing it and see if it does the conversion it's supposed to...

Update 20031031:
Code was written and commited into CVS yesterday. I'm now in the process of testing the module. I don't
expect it to work (it was quite a quick hack), but with a little optimization it should work. The basics
are there, now I just need to fine tune the code :).