Версия для печати темы
Нажмите сюда для просмотра этой темы в оригинальном формате
Форум программистов > PHP: Общие вопросы > icq


Автор: Dexter 2.5.2004, 17:03
как послать icq сообщение через php скрипт?

Автор: IZ@TOP 2.5.2004, 20:32
http://php.net/sockets

Автор: Sardar 2.5.2004, 23:57
По моему мылить надо на [email protected] В заголовке нужно указывать мыло отправителя: From: $name<$email>\nReply-To: $email

Сообщение не должно быть длинее 396 символов. Здесь ICQ иконка-состояние юзера: http://online.mirabilis.com/scripts/online.dll?icq=icq_uin

Автор: Cheba 4.5.2004, 21:31
Код
/***********

This function sends an ICQ message. Uses www.icq.com web interface.

Parameters:
 $to - ICQ UIN of recipient
 $name - name of sender
 $email - sender email
 $subject - message subject
 $body - message body

Example:

 SendICQ(12345678,"WHiZZ","[email protected]","Greeting","Hey, it works !");

 
*/

function SendICQ($to,$name,$email,$subject,$body) {
 $variables = "from=" . RawURLEncode($name) . "&fromemail=" .
              RawURLEncode($email) . "&subject=" . RawURLEncode($subject) .
              "&body=".RawURLEncode($body)."&to=$to&Send=Send+Message";
 $request = "POST http://wwp.icq.com/scripts/WWPMsg.dll HTTP/1.0
Referer: http://wwp.icq.com/$to
Proxy-Connection: Keep-Alive
User-Agent: Mozilla/4.72 [en] (X11; U; Linux 2.2.17 i686)
Host: wwp.icq.com
Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, image/png, */*
Accept-Encoding: gzip
Accept-Language: en
Accept-Charset: iso-8859-1,*,utf-8
Content-type: application/x-www-form-urlencoded
Content-length: " . strlen($variables) . "

$variables";

 if ($fs = fsockopen("wwp.icq.com",80)) {
   fputs($fs, $request);
   fclose($fs);
 }
 else
   echo "Error while connecting.";
}

Автор: Master 4.5.2004, 21:43
http://php.spb.ru/php/icq.html

Автор: Dexter 5.5.2004, 16:45
Спасибо, попробую.

Powered by Invision Power Board (http://www.invisionboard.com)
© Invision Power Services (http://www.invisionpower.com)