本文整理匯總了PHP中WhatsProt::RequestLastSeen方法的典型用法代碼示例。如果您正苦於以下問題:PHP WhatsProt::RequestLastSeen方法的具體用法?PHP WhatsProt::RequestLastSeen怎麽用?PHP WhatsProt::RequestLastSeen使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類WhatsProt
的用法示例。
在下文中一共展示了WhatsProt::RequestLastSeen方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: trim
$command = trim(strstr($line, ' ', TRUE));
} else {
$command = $line;
}
switch ($command) {
case "/query":
$dst = trim(strstr($line, ' ', FALSE));
echo "[] Interactive conversation with {$dst}:\n";
break;
case "/accountinfo":
echo "[] Account Info: ";
$wa->accountInfo();
break;
case "/lastseen":
echo "[] Request last seen {$dst}: ";
$wa->RequestLastSeen("{$dst}");
break;
default:
echo "[] Send message to {$dst}: {$line}\n";
$wa->Message(time() . "-1", $dst, $line);
break;
}
}
}
exit(0);
}
if ($_SERVER['argv'][1] == "-l") {
echo "\n[] Listen mode:\n";
while (TRUE) {
$wa->PollMessages();
$data = $wa->GetMessages();
示例2: trim
$command = trim(strstr($line, ' ', TRUE));
} else {
$command = $line;
}
switch ($command) {
case "/query":
$dst = trim(strstr($line, ' ', FALSE));
echo "[] Interactive conversation with {$dst}:\n";
break;
case "/accountinfo":
echo "[] Account Info: ";
$wa->accountInfo();
break;
case "/lastseen":
echo "[] Request last seen {$dst}: ";
$wa->RequestLastSeen(time() . "-1", "{$dst}");
break;
default:
echo "[] Send message to {$dst}: {$line}\n";
$wa->Message(time() . "-1", $dst, $line);
break;
}
}
}
exit(0);
}
if ($_SERVER['argv'][1] == "-l") {
echo "\n[] Listen mode:\n";
while (TRUE) {
$wa->PollMessages();
$data = $wa->GetMessages();