Lesser GPL. Must keep comment block at the top.
This is a library/tool is for converting LDIFs generated by exporting a Mozilla address book into GroupWise vCards.
The primary function in this library is convert_ldif_to_vcard($filein, $fileout).
Just call it and specify the input file and the output file. It assumes that the filename you pass it is a valid LDIF file exported from a Mozilla address book. It won't do syntax checking on the oiginal LDIF.
Optionally, there is also string_convert_ldif_to_vcard($stringin, & $stringout).
This function is exactly the same as the other function, except that it works on strings instead of files. Note that the second variable is a reference to a string.
Both functions return a count of the number of LDIF cards that were converted upon success.
This script can also be used as a command-line converter which specifies the input and output files as arguments on the commandline. Support for pre-defined argv, argc variables must be turned on in php.ini.
This library was originally written for PHP 5, but has subsequently been fixed to run on PHP 4.2. All of it's functions should be predefined by PHP and don't require any loadable modules.