Note that there are some explanatory texts on larger screens.

plurals
  1. POiPhone Feedback Service with PHP
    text
    copied!<p>HI All,</p> <p>Has anybody been able to extract the device tokens from the binary data that iPhone APNS feedback service returns using PHP? I am looking for something similar to what is been implementented using python here <a href="http://www.google.com/codesearch/p?hl=en&amp;sa=N&amp;cd=2&amp;ct=rc#m5eOMDWiKUs/APNSWrapper/__init__.py&amp;q=feedback.push.apple.com" rel="nofollow noreferrer">http://www.google.com/codesearch/p?hl=en&amp;sa=N&amp;cd=2&amp;ct=rc#m5eOMDWiKUs/APNSWrapper/<strong>init</strong>.py&amp;q=feedback.push.apple.com</a></p> <p>As per the Apple documentation, I know that the first 4 bytes are timestamp, next 2 bytes is the length of the token and rest of the bytes are the actual token in binary format. (<a href="http://developer.apple.com/IPhone/library/documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/CommunicatingWIthAPS/CommunicatingWIthAPS.html#//apple_ref/doc/uid/TP40008194-CH101-SW3" rel="nofollow noreferrer">http://developer.apple.com/IPhone/library/documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/CommunicatingWIthAPS/CommunicatingWIthAPS.html#//apple_ref/doc/uid/TP40008194-CH101-SW3</a>)</p> <p>I am successfully able to extract the timestamp from the data feedback service returns, but the device token that I get after i convert to hexadecimal using the PHP's built in method bin2hex() is actually different than original device token. I am doing something silly in the conversion. Can anybody help me out if they have already implemented APNS feedback service using PHP?</p> <p>TIA, -Anish</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload