PHP technique to query the APNs Feedback Server

前端 未结 5 1041
佛祖请我去吃肉
佛祖请我去吃肉 2020-11-27 11:15

Can someone clarify what the APNs (Apple Push Notification) wants as far as how you query it?

The docs say it starts sending as soon as the connection is made. Does

5条回答
  •  难免孤独
    2020-11-27 12:04

    That code looks right however you need to loop and check for end of stream in order to read all the device codes.

     while (!feof($apns)) {
            $devcon = fread($apns, 38);
     }
    

    However my problem is the actual unpacking of the data. Does anyone know how to unpack the binary data which you've just read to get the actual device ID (as string) along with the timestamp etc?

提交回复
热议问题