Jump to content


Photo

Creating a "chatting bot" using PHP


  • Please log in to reply
No replies to this topic

#1 alekz

alekz
  • New Members
  • Pip
  • Newbie
  • 4 posts

Posted 28 February 2006 - 05:13 AM

I'm trying to code a page in which you can "chat" with a selected celebrity.

For example; Someone goes to my page and they click the link to "chat" with Il Divo. Of course they're not really going to chat with any of the members. However, I want to make it to where they ask/comment and they get a LOGICAL response.

I have done this before using Javascript. Using; "var i = Math.floor(Math.random() * 5);". [a href=\"http://itsallaboutplanetkidz.com/sample.htm\" target=\"_blank\"]Here's[/a] an example.

But someone told me it would be easier and more efficent using PHP. They ask a question and upon submitting the DB is searched.

EX.

How are you?

Then get the DB to search for
How (*?) are (*?) you (*?) ?

and generate a logical response.


I don't know if all that made sense. Im pretty much trying to create a type of bot to give out logical responses. Kindda like I did it with Javascript, but much 'smarter.'

Suggestion, help, comments are greatly appreciated it.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users