Показать сообщение отдельно

  #140  
Старый 08.09.2008, 08:36
.::BARS::.
Постоянный
Регистрация: 13.10.2007
Сообщений: 347
Провел на форуме:
1345617

Репутация: 115
По умолчанию

как сделать переменную в боте... как например тут:

PHP код:
$fp fsockopen("kanicq.ru"80$errno$errstr30); 
$query 'human=1&uin='.$icq.'&uin4login=&password4login='
$out  "POST /invisible/?method=2 HTTP/1.1\r\n"
$out .= "Host: kanicq.ru\r\n"
$out .= "Referer: http://kanicq.ru/invisible/?method=2\r\n"
$out .= "Content-Type: application/x-www-form-urlencoded\r\n"
$out .= "Content-length: ".strlen($query)."\r\n\r\n"
$out .= $query
fwrite($fp$out); 
$result ''
while (!
feof($fp)) 

$result .= fgets($fp128); 
}
fclose($fp);
if ( 
preg_match ("/Free for chat/i" "$result")) { $status "ГОТОВ К ОБЩЕНИЮ"; } 
elseif ( 
preg_match ("/Online/i" ,"$result")) { $status "ОНЛАЙН"; } 
elseif ( 
preg_match ("/Away/i" "$result")) { $status "ОТОШЕЛ"; } 
elseif ( 
preg_match ("/N\/A/i" "$result")) { $status "НЕДОСТУПЕН"; } 
elseif ( 
preg_match ("/Occupied/i" "$result")) { $status "ЗАНЯТ"; } 
elseif ( 
preg_match ("/DND/i" "$result")) { $status "ПРОСИТ НЕ БЕСПОКОИТЬ"; } 
elseif ( 
preg_match ("/offline/i" "$result")) { $status "ОФФЛАЙН"; } 
elseif ( 
preg_match ("/status\/invisible/i" "$result")) { $status "НЕВИДИМЫЙ"; } 
else { 
$status "НЕИЗВЕСТНО"; } 

return 
'Номер '.$icq.' сейчас '.$status
переменная
PHP код:
$icq 
... то есть я пишу боту !icq <номер>, и он присылает мне ответ!
 
Ответить с цитированием