Jump to content

Recommended Posts

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.
Link to comment
https://forums.phpfreaks.com/topic/3727-creating-a-chatting-bot-using-php/
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.