PHP Question
i want to make my bot do something specifically. i know alittle bit about php but not fully. let me break it down as best i can on what i want it to do.
if someone says HI
i want to make it echo, hi how are you
if someone says good you
i want it to echo wounderful thanks for asking
and so on and so forth
after that it has everything taught the stuff people would ask that it isn't programed i want it to echo sorry, i don't understand, please try again.
what script to i use where i can keep adding peoples responses to the bots echos.
Comments are currently closed for this discussion. You can start a new one.
2 Posted by Ben Parzybok on 19 Nov, 2009 05:12 PM
Here's an example:
Create a php script called bot.php
Put it up on a domain, and make sure your bot URL reflects the location of that script.
Paste this into bot.php:
<?php
//convert all messages to lower case
$msg = strtolower($_REQUEST["msg"]);
switch($msg)
{
} ?>
Support Staff 3 Posted by Danté Vitulano on 20 Nov, 2009 03:03 PM
Ben is right on the money. If afterwards you wanted to add additional possible responses, all you would need to do is add more cases. It's as simple as that.
~Danté
Danté Vitulano closed this discussion on 20 Nov, 2009 03:03 PM.
irish_ignite re-opened this discussion on 28 Nov, 2009 05:44 AM
4 Posted by irish_ignite on 28 Nov, 2009 05:44 AM
yea sorry, i seen the response in an email. didn't get around to messaging back. this is exactly what i was looking for. I really really appreciate the help and thank ya a lot for everything.
5 Posted by mlucas on 15 Oct, 2010 03:39 PM
It looks like we've answered this for you, so we're going to mark this question as resolved. If you have any questions, you can re-open this issue or send a new one in and we'll be glad to help.
-Matt Lucas
IMified Support
mlucas closed this discussion on 15 Oct, 2010 03:39 PM.