- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
<?php
// AI для jabber-бота http://coolbot.vndv.com
// Автор AI: Black.ZerO
$db = mysql_connect($dbhost, $dbuser, $dbpasswd) or die("MySQL error");
mysql_select_db($dbname, $db);
$result = mysql_query("select * from mozg", $db);
$myrow = mysql_fetch_array($result);
$messages['body'] = "Hello";
do
{
if ($messages['body'] == $myrow[question])
{
echo "OK";
break;
}
else {
echo "false";
}
}
while ($myrow = mysql_fetch_array($result));