Skip to content

Instantly share code, notes, and snippets.

Mattias Fjellvang simplenotezy

View GitHub Profile
@simplenotezy
simplenotezy / gist:c30ca5b0aea87ec0df57
Created Feb 8, 2016
Decode 64 hexadecimal characters APNS token to 32bit
View gist:c30ca5b0aea87ec0df57
function base64_decode_apns_token($token) {
$a = unpack("H*hex", base64_decode($token));
$b = str_split($a["hex"], 8);
$output = "";
foreach ($b as $current) {
$output .= "$current";
}
return trim($output);
You can’t perform that action at this time.