Services_Apns
[ class tree: Services_Apns ] [ index: Services_Apns ] [ all elements ]

Source for file index.php

Documentation is available at index.php

  1. <?php
  2.  
  3. require '../Services/Apns/Client/Message.php';
  4.  
  5. /* Creates new Message client instance */
  6. $client = new Services_Apns_Client_Message();
  7.  
  8. /* Set the authorized certificate provided by Apple */
  9. $client->setSslCertificateFilePath(dirname(__FILE__'/aps_developer_identity.pem');
  10.  
  11. /* Defining the password phrase specified in the Provisioning Portal */
  12. $client->setPasswordPhrase('My top secret password!');
  13.  
  14. /* Setting the default ENV */
  15. $client->setDefaultEnvironment(Services_Apns_Client::ENV_SANDBOX);
  16.  
  17. /* Creating a new message */
  18. $message = new Services_Apns_Message();
  19. $message->setBody('This is a simple test!');
  20.  
  21. /* FIRE! */
  22. $result $client->sendMessage($message);
  23.  
  24. var_dump($result);

Documentation generated on Mon, 11 Mar 2019 15:53:02 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.