<?php //デバイストークン32バイトを16進数表記にしたもの $deviceToken = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"; $host = "gateway.sandbox.push.apple.com"; //① $port = 2195; $cert = "pushex_dev.pem"; //鍵 $passphrase = "[パスフレーズ]"; //鍵のパスフレーズ $aps = array(); $aps["aps"] = array("alert" => "テスト送信", "badge" => 1, "sound" => "default"); $payload = json_encode($aps); //ソケット接続を設定 $context = stream_con