Code Monkey home page Code Monkey logo

apns_safari_push's Introduction

APNS_Safari_Push

Send push notification to Safari. You have give the pem Cert (Line 7), password of pem cert (Line 10), and Token (Line 13).

Add your payload from Line 62-65.

Enjoy !!......

Where to get the Entrust Root CA PEM file

  1. Launch Keychain Assistant
  2. click on System Root Certificate
  3. Select the Certificates on the bottom-left
  4. Right-click on Entrust.net Certification Authority (2048) and export with Entrust.net Certification Authority (2048).pem file name and choose as document format Privacy Enhanced Mail (.pem).
  5. Now you can use this PEM file as Entrust Root Certification Authority in php to verify Apple Peer!

apns_safari_push's People

Contributors

ananthakrish avatar mmolinari avatar

Stargazers

 avatar Andy avatar Carlos Aguilar avatar Michael Aguiar avatar Ken Vermeille avatar Alexandru Serban avatar Ovidiu Galatan avatar Sohel Amin avatar Yevgen avatar Eunkwang Shin avatar Unknown Hero avatar Dan avatar Kha Nguyen avatar

Watchers

James Cloos avatar  avatar

apns_safari_push's Issues

failed loading cafile stream

Hello,
I'm having a problem with the php script on my server :

E_WARNING Error in file notificationsSafari.php at line 113: failed loading cafile stream: Entrust.net Certification Authority (2048).pem.pem'
E_WARNING Error in file notificationsSafari.php at line 113: stream_socket_client(): Failed to enable crypto
E_WARNING Error in file notificationsSafari.php at line 113: stream_socket_client(): unable to connect to ssl://gateway.push.apple.com:2195 (Unknown error)`

Line 113 is :
$fp = stream_socket_client( $this->push_apple, $err, $errstr, 60, STREAM_CLIENT_CONNECT | STREAM_CLIENT_PERSISTENT, $ctx );

Seeing that on my server I don't find a php.ini satisfying conf (with a openssl.cafile field well provided) I commented the line:
$stream_success = stream_context_set_option( $ctx, 'ssl', 'cafile', 'Entrust.net Certification Authority (2048).pem.pem' );
And the script goes to the end, but I don't receive the notification. I verified the token, it's good.
How to know where does it block ?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.