當前位置: 首頁>>代碼示例>>PHP>>正文


PHP WhatsProt::sendMessagePaused方法代碼示例

本文整理匯總了PHP中WhatsProt::sendMessagePaused方法的典型用法代碼示例。如果您正苦於以下問題:PHP WhatsProt::sendMessagePaused方法的具體用法?PHP WhatsProt::sendMessagePaused怎麽用?PHP WhatsProt::sendMessagePaused使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在WhatsProt的用法示例。


在下文中一共展示了WhatsProt::sendMessagePaused方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: WhatsProt

// password
// konek ------------------------------------------------------------------------------------------------------------
echo "+ Login sebagai {$nickname} ({$username})\n+\n";
$w = new WhatsProt($username, $nickname, $debug);
sleep(3);
$w->connect();
$w->loginWithPassword($password);
$w->sendGetServerProperties();
$w->sendClientConfig();
$w->sendGetGroups();
$w->sendPing();
// kirim pesan ke nomor tujuan --------------------------------------------------------------------------------------
$target = "62xxxxxxxxxxx";
$pesan = "Halo Dunia!";
echo "+ Mengirim pesan\n";
echo "+  target : {$target}\n";
echo "+  pesan  : {$pesan}\n+\n";
$w->sendMessageComposing($target);
// typing..
sleep(3);
$w->sendMessagePaused($target);
// selesai typing
sleep(1);
$w->sendMessage($target, $pesan);
// kirim pesan
$w->pollMessage();
sleep(1);
$w->pollMessage();
sleep(1);
$w->pollMessage();
echo "+ Selesai\n+\n";
開發者ID:jl91,項目名稱:wasapbot,代碼行數:31,代碼來源:wasap-sendmsg.php

示例2: trim

 }
 */
 if ($line != '') {
     if (strrchr($line, ' ')) {
         $command = trim(strstr($line, ' ', true));
     } else {
         $command = $line;
     }
     switch ($command) {
         case '/current':
             $nickname = findNicknameByPhone($contact);
             echo "[] Interactive conversation with {$nickname}:\n";
             break;
         case '/lastseen':
             echo "[] Last seen {$contact}: ";
             $w->sendMessagePaused($contact);
             $compose = true;
             $w->sendPresenceSubscription($contact);
             break;
         case '/sendimage':
             echo "\nEnter the URL or path of the image > ";
             $filepath = trim(fgets(STDIN));
             echo "\nSay something about the image > ";
             $caption = trim(fgets(STDIN));
             $target = $contact;
             $w->sendMessageImage($target, $filepath, false, $fsize, $fhash, $caption);
             $w->pollMessage();
             break;
         case '/sendvideo':
             echo "\nEnter the URL or path of the video > ";
             $filepath = trim(fgets(STDIN));
開發者ID:MattPorto,項目名稱:Chat-API,代碼行數:31,代碼來源:client.php


注:本文中的WhatsProt::sendMessagePaused方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。