PHP AGI library migrated from stgagi.googlecode.com