AIML also known as Artificial Intelligence Markup Language teaches the bot how to think.
For PHP users there is an interface to do this job.
Humans have long been fascinated with Artificial Intelligence. Online artificial intelligence, often called bots, are all measured against the mother of all online intelligence, A.L.I.C.E. Standing for “Artificial Linguistic Internet Computer Entity,” A.L.I.C.E is a chat bot developed in the mid 90s that is capable of holding intelligent conversation, and giving relevant answers.
ALICE responds to the language AIML to get instruction how to think. There are several implementations of this in PHP called program E.
You can read about AIML here.