【发布时间】:2015-12-14 01:27:12
【问题描述】:
关于asked的问题,我不知道如何一次发送多条消息。
the Binary frame image from Apple ios
系列项目呢?
我如何创建一个项目?而不是帧数据?
我试过了
while ($row = mysqli_fetch_assoc($result)){
//command 2
$msgInner =
chr(1)
. pack('n', 32)
. pack('H*', $row['device_token'])
. chr(2)
. pack('n', strlen($payload))
. $payload
. chr(3)
. pack('n', 4)
. $row['id']
. chr(4)
. pack('n', 4)
. pack('N', time() + 86400)
. chr(5)
. pack('n', 1)
. chr(10);
$framedata.=$msgInner; //to accumulate (probably wrong, and need binary packing)
}
$msg=
chr(2)
. pack('N', strlen($framedata))
. $framedata;
它只发送到我的 sql 结果中的最后一行。
你能给我正确的数据包格式吗?
【问题讨论】:
标签: php ios binary apple-push-notifications pack