public function getDeviceUUIDs()
    {
        if (!strlen($this->pem)) {
            throw new \RuntimeException("PEM not provided");
        }

        $feedbackURL = "ssl://feedback.push.apple.com:2196";
        if ($this->sandbox) {
            $feedbackURL = "ssl://feedback.sandbox.push.apple.com:2196";
        }
        $data = "";

        $ctx = $this->getStreamContext();
        $fp = stream_socket_client($feedbackURL, $err, $errstr, $this->timeout, STREAM_CLIENT_CONNECT|STREAM_CLIENT_PERSISTENT, $ctx);
        if (!$fp) {
            throw new \RuntimeException("Couldn't connect to APNS Feedback service. Error no $err: $errstr");
        }
        while (!feof($fp)) {
            $data .= fread($fp, 4096);
        }
        fclose($fp);
        if (!strlen($data)) {
            return array();
        }

        $feedbacks = array();
        $items = str_split($data, 38);
        foreach ($items as $item) {
            $feedback = new Feedback();
            $feedbacks[] = $feedback->unpack($item);
        }

        return $feedbacks;
    }
public function getDeviceUUIDs()
    {
        if (!strlen($this->pem)) {
            throw new \RuntimeException("PEM not provided");
        }

        $feedbackURL = "ssl://feedback.push.apple.com:2196";
        if ($this->sandbox) {
            $feedbackURL = "ssl://feedback.sandbox.push.apple.com:2196";
        }
        $data = "";

        $ctx = $this->getStreamContext();
        $fp = stream_socket_client($feedbackURL, $err, $errstr, $this->timeout, STREAM_CLIENT_CONNECT|STREAM_CLIENT_PERSISTENT, $ctx);
        if (!$fp) {
            throw new \RuntimeException("Couldn't connect to APNS Feedback service. Error no $err: $errstr");
        }
        while (!feof($fp)) {
            $data .= fread($fp, 4096);
        }
        fclose($fp);
        if (!strlen($data)) {
            return array();
        }

        $feedbacks = array();
        $items = str_split($data, 38);
        foreach ($items as $item) {
            $feedback = new Feedback();
            $feedbacks[] = $feedback->unpack($item);
        }

        return $feedbacks;
    }
public function getDeviceUUIDs ( ) { if ( ! strlen ( $ this -> pem ) ) { throw new \ RuntimeException ( "PEM not provided" ) ; } $ feedbackURL = "ssl://feedback.push.apple.com:2196" ; if ( $ this -> sandbox ) { $ feedbackURL = "ssl://feedback.sandbox.push.apple.com:2196" ; } $ data = "" ; $ ctx = $ this -> getStreamContext ( ) ; $ fp = stream_socket_client ( $ feedbackURL , $ err , $ errstr , $ this -> timeout , STREAM_CLIENT_CONNECT | STREAM_CLIENT_PERSISTENT , $ ctx ) ; if ( ! $ fp ) { throw new \ RuntimeException ( "Couldn't connect to APNS Feedback service. Error no $err: $errstr" ) ; } while ( ! feof ( $ fp ) ) { $ data .= fread ( $ fp , 4096 ) ; } fclose ( $ fp ) ; if ( ! strlen ( $ data ) ) { return array ( ) ; } $ feedbacks = array ( ) ; $ items = str_split ( $ data , 38 ) ; foreach ( $ items as $ item ) { $ feedback = new Feedback ( ) ; $ feedbacks [ ] = $ feedback -> unpack ( $ item ) ; } return $ feedbacks ; }
Gets an array of device UUID unregistration details
from the APN feedback service

@throws \RuntimeException
@return array
Gets an array of device UUID unregistration details from the APN feedback service