本文整理汇总了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";
示例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));