AIML Bot is a PHP bot that handle the AIML language.

Use cases and Reference

AIML Bot is for advanced users, and no support will be provided for users that don't know how to use PHP or MySQL.

First thing to do: create the database schema. You just have to apply the SQL code available in aiml.sql.

Say you have the following MySQL settings:
Hostname: localhost
Database: my_database1
User: my_user
Password: paSSworD

First, start by configuring config.php provided in the archive:
$aiml = new Aiml('localhost', 'my_database1', 'my_user', 'paSSworD');
Then create a brain (you may want to do this only once):
$aiml->updateBrain(0, 'My Brain', 'user', 'pa$$word');
Just call /aiml-bot/editor.php to get to the editor.

The editor will ask you for credentials: just enter the one you've set in the updateBrain() call.

In the editor, just add/update categories. You must learn AIML first, in order to do something good. Once you've done some categories, just click on «Compute the Graphmaster» to apply all your changes.

To test what you've done, open /aiml-bot/index.php and type in some text.

How to use the AIML class in your own script?
Aiml->getAnswer($question, $bot, $user) is the function you're looking for. You just have to pass the following data:
$question: the question the user sent (its input)
$bot: the BOT_ID (if you have only one bot, that should be 1)
$user: a unique string representing the user (can be an email, an user_id, a session string)


More information: