Login   Register  
PHP Classes
elePHPant
Icontem

File: example.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Yasir Siddiqui  >  PHP Apple Push Notification Service  >  example.php  >  Download  
File: example.php
Role: Example script
Content type: text/plain
Description: Example
Class: PHP Apple Push Notification Service
Send push notifications to Apple devices
Author: By
Last change:
Date: 7 months ago
Size: 397 bytes
 

Contents

Class file image Download
<?php
include("PushNotification.php");

// set enovirnment and cretificate path
$push = new PushNotification("sandbox","./cert.pem");
// set device token
$push->setDeviceToken("DEVICE TOKEN HERE");
// Set pass phrase if any
$push->setPassPhrase("YOUR pass phrase here");
// Set badge
$push->setBadge(2);
// Set message body
$push->setMessageBody("Message body here");
$push->sendNotification();
?>