
04.07.2008, 01:26
|
|
Познавший АНТИЧАТ
Регистрация: 23.08.2007
Сообщений: 1,237
Провел на форуме: 18127311
Репутация:
1676
|
|
Как то так:
PHP код:
<?
set_time_limit(0);
require_once('WebIcqPro.class.php');
$file = 'anek.txt';
$icq = new WebIcqPro();
$uin = 1234567;
$pwd = 123456;
$anek = file($file);
if($icq->connect($uin,$pwd)) { echo "Connected";}
else { echo $icq->error; exit();}
while($icq->isConnected()) {
$msg = $icq->readMessage();
if(preg_match('/!anekdot/', $msg['message'], $trash))
{
$icq->sendMessage($msg['from'], $anek[rand(0,sizeof($anek)-1)]);
}
}
?>
|
|
|