FCLIB is an open-source php library. It is basically a collection of functions I've needed in various projects over the years where I made the extra step to make them generic in the hope they may be needed in another project in future. It is similar to PHP's Pear, but not so organized. Naturally, given that much of my work is on Japanese websites and databases, there are some useful Japanese-related functions. The license is BSD-like (with no advertising clause) so there are no restrictions on commercial use.
It has been at version 0.4.x for over 5 years, so please do not use the zero version number as a guide to maturity. Instead you will find a wide range of quality in the library, and should consider each file independently. If you have any questions please let me know.
Some minor bug fixes, a new utf8 function, and a new class for modifying images. (Big jump in filesize is due to the unit tests for the images.)
tgz File Full Version (669 Kb)
tgz File i18n Subset (90 Kb)
The included files are: arabic.inc, chasen.inc, chinese_tra_sim.inc, fclib_quickform_rules.js, gettext.inc, i18n.inc, i18n_ex.inc, i18n_sql.inc, jp_phone.inc, jpref_arrays.utf8.inc, ml_dict.inc, namazu.inc, noun_relations_query.inc, noun_search_result.inc, pinyin.inc, quickdic.inc, quickform_rules.inc, utf8.inc, License.txt.
Changed functions: mail.inc (bug fix for when spaces at end of a mail header), sendmail.all.inc (option to specify EHLO name), sql.inc (stop some php5 warnings)
New function: utf8.inc: fclib_utf8_truncate() (Shortens a string, appending ..., if it is too long)
New files: modify_images.inc (high-level interface that uses gd functions to make doing thumbnails, cropping, resizing and basic drawing edits, easier, for either one or a batch of images).
Over two years since the last release. Arabic support has been added, but otherwise just minor improvements and fixes.
tgz File Full Version (558 Kb)
tgz File i18n Subset (as i18n.4.18 entry below, but also arabic and quickdic included) (89 Kb)
New files: file_set_info.inc (analyzes a set of files to find min/max/average size and datestamp); quickdic.inc (reading and query quickdic files, which are simple one-way lookup files); arabic.inc (various helper functions for dealing with arabic and its transliteration). Minor improvements to: noun_search_result.inc; ml_dict.inc (added arabic); utf8.inc (added fclib_is_utf8_string); load_save.inc; mail_bounce.inc; sendmail.all.inc (support for pipelining and specifying EHLO name, important bug fixes if dealing with a fussy SMTP server). Some of the changes are just to quieten the increased warnings you get running the code under php5.
This is a subset of the full fclib library, containing just the files related to multilingual computing. This is a first step in splitting fclib into more manageable chunks. If you have any thoughts on this please let me know. (i18n related but not included: jmdict and wikimedia parsers, tests, utilities, ipadic dictionary extensions.)
tgz File (83 Kb)
The included files are: chasen.inc, chinese_tra_sim.inc, fclib_quickform_rules.js, gettext.inc, i18n.inc, i18n_ex.inc, i18n_sql.inc, jp_phone.inc, jpref_arrays.utf8.inc, ml_dict.inc, namazu.inc, noun_relations_query.inc, noun_search_result.inc, pinyin.inc, quickform_rules.inc, utf8.inc, License.txt.
There has been over a year since the last public release, with quite a few additions, especially for dealing with Japanese and Chinese data. All changes should be backwards-compatible.
tgz File (534 Kb)
Minor bug fixes: chasen.inc, gettext.inc. New functions:
Note: Since fclib.0.4.8 all new functions, and new files, are documented inline (for use with phpDocumentor), and the HTML documentation is no longer being maintained. Check the source (or run phpDocumentor on the files).
Unzip into the directory of your choice (that will be the $FCLIB_PATH you'll set at the top of every file). E.g. "/web/devel/fclib.0.4/". On Windows something like "C:\fclib.0.4\".
2006-02-20: Updated 0.4.17. fclib_quickform_rules.js/quickform_rules.inc (fclib_check_european_or_punctuation() added); chasen.inc (new function to return all words not just a few); utf8.inc (fclib_utf8_remove_diacritics() added); jmdict.inc (important bug fixes); sql.inc (fclib_sql_escape_for_LIKE() added). Also some more words were added to the ipadic (chasen dictionary) extensions. The utilities subdirectory was added, with tools related to wordnet and wikipedia data.
Note: noun_relations_query.inc, noun_search_result.inc are still experimental; the next release may not be backwards compatible to them, so please ignore them for the moment.
tgz File (477 Kb)
2006-01-11: Updated: 0.4.16. Eight months since the last release and quite a lot of new functions, classes and files:
Note: noun_relations_query.inc, noun_search_result.inc are experimental code and the next release may not be backwards compatible to them, so please ignore them.
2005-05-11: Updated: 0.4.15. Bug fixes and small improvements to new files added in 0.4.13 and 0.4.14.
2005-03-07: Update: 0.4.14. Bug fixes and improvements in the files that were new in 0.4.13: socket_server.inc, price_server.inc, price_range.inc, price_retriever.inc; new function in parse_text_data.inc. One new file: data_server.inc.
2005-02--03: Update: 0.4.13. New files: socket_server.inc, price_server.inc, price_range.inc, price_retriever.inc.
Bug fixes: database_search_form.inc (when using NE with non-blank string).
All is backwards-compatible with 0.4.12 and earlier, with the exception of some veritrans.inc code (because a new error return value has been added).
2004-06-07/14/24: Update: 0.4.12c. New files: utf8.inc (UTF8 equivalent of chr(), and functions to help parsing XML entities); pear_xml_unserializer.inc (customized version of Pear's XML/Unserializer.php that doesn't lose entities and better handles when you have cdata mixed with tags); pear_xml_serializer.inc (complement of unserializer); xml_navigator.inc (classes to help use the array returned by the unserializer class; perhaps useful for more general associative arrays). Modified files: mail_ex.inc (updated list of mobile email addresses), parse_text_data.inc (bug fix for when parsing csv data with quoted fields), text_data_import.inc (minor improvement in efficiency). (12b and 12c releases were just bug fixes)
2004-03-17: Update: 0.4.11. delivery_scheduler.inc is new, and the following files have changed: database_search_form.inc (next/prev handling improved); extended_field_interface.inc (added option to hide delete buttons on edit fields form); veritrans.inc (support for postauth) and veritrans_order.pl (request-type included in log-file written to processed directory).
2003-10-30: Update: 0.4.10. Added new features to database_search_form (backwards-compatible, but there are new text strings, so you may need to do some translation) and veritrans files (NB. default changed from authcapture to authonly - see docs).
2003-09-18: Update: 0.4.9c. Bug fixes for 0.4.9.
2003-08-18: Update: 0.4.9b. Bug fixes for 0.4.9.
2003-08-11: Update: 0.4.9. Added sendmail.all.inc, which unifies sendmail.sendmail.inc (and exim version) and sendmail.smtp.inc. Added veritrans.inc/veritrans.pl for credit card verification (Japanese company). Also changes to extended_field_interface.inc (bug fix), mail.inc (bug fix, plus use of new sendmail files), mail_bounce.inc (added fclib_bounce_email_count), mail_ex.inc (bug fixes), database_search_form.inc (bug fix), sql.inc (added fclib_pear_db_error).
2003-05-25: Update: 0.4.8. Additions/Changes to: namazu.inc, mail.inc, error_check.inc, parse_text_data.inc, array.inc, make_text_data.inc, License.txt, text_export.inc, sql.inc, hidden.inc, mail_bounce.inc, mail_headers.inc, dirs.inc, table_viewer.inc, sendmail.inc, sendmail.sendmail.inc, sql_filter.inc; New files: database_search_form.inc, text_data_import.inc, extended_field_interface.inc, gettext.inc, database_field_information.inc, merge_html_files.inc (commandline utility), database_table_structure.inc.
Many of the changed files are just to make it work quietly with error_reporting(E_ALL), and with register_globals=off. By implication, the files not listed above may give warnings if running with E_ALL.
2002-11-01: Update: 0.4.7. Minor update: webscan bugfix and extra documentation; added copyright comment to top of every fclib file.
2002-10-05: Update: 0.4.6. Added namazu support, other minor tidyup, moved webscan files into release version.
(older versions than this are not stored on this mirror server).