PHP Classes

Simple Push: Send email messages or to Android and iOS devices

Recommend this page to a friend!
  Info   Documentation   View files Files   Install with Composer Install with Composer   Download Download   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
StarStarStarStar 78%Total: 423 All time: 6,376 This week: 43Up
Version License PHP version Categories
simplepush 1.0.0GNU General Publi...5Email, PHP 5, Wireless and Mobile
Description 

Author

This package can send email messages or to Android and iOS devices.

There is a base class that provides communication services and options to set the message sender and recipients.

There are also sub-classes specialized in sending messages by email, or mobile devices using Android or iOS.

Picture of Duong Huynh Nghia
  Performance   Level  
Innovation award
Innovation award
Nominee: 1x

 

Recommendations

What is the best PHP push notification for web class?
Push notification for Web applications

Documentation

SimplePush

Send mail

use SimplePush;
$aConfigs = array(
	'method' => smtp //or mail
    'host' => smtp.gmail.com
    'user' => hello@fwebshop.com
    'password' => hellopass
    'authenticate' => tls // or ssl
    'port' => 587
);
$aMessage = array(
	'subject' => "Hello Mail"
    'content' => "Mail content"
    'from' => hello@fwebshop.com

);
$oInstance = new SimplePush\Mail($aConfigs);
$oInstance->message($aMessage);
$oInstance->to("nicetomeetyou@fwebshop.com");
$oInstance->send();
$mResults = $oInstance->getResults();
$aTmpError = $oInstance->getErrors();

Push to Android device

use SimplePush;
$aConfigs = array(
    'app_mode' => "production" //or development
    'api_access_key' => "Project API Key got from Google"
    
);
$aMessage = array(
   'command' => '2',
   'message' => 'Hello Android', 
   'your_param' => 'your_value'

);
$oInstance = new SimplePush\Android($aConfigs);
$oInstance->message($aMessage);
$oInstance->to("device_token_id");
$oInstance->send();
$mResults = $oInstance->getResults();
$aTmpError = $oInstance->getErrors();

Push to iOS device

use SimplePush;
$aConfigs = array(
    'app_mode' => "production" //or development
    'certification_file' => "Link to pem file"
    'password' => "" // passphrase for certificated file. 
   
);
$aMessage = array(
   'aps' => array(
      'alert' => 'Hello iOS',
      'sound' => 'default'
   )

);
$oInstance = new SimplePush\IOS($aConfigs);
$oInstance->message($aMessage);
$oInstance->to("device_token_id");
$oInstance->send();
$mResults = $oInstance->getResults();
$aTmpError = $oInstance->getErrors();

  Files folder image Files (180)  
File Role Description
Files folder image.settings (2 files)
Files folder imagelib (1 directory)
Accessible without login Plain text file .buildpath Data Auxiliary data
Accessible without login Plain text file .project Data Auxiliary data
Plain text file Android.php Class Class source
Plain text file IOS.php Class Class source
Plain text file Mail.php Class Class source
Plain text file Provider.php Class Class source
Accessible without login Plain text file README.md Doc. Documentation

The PHP Classes site has supported package installation using the Composer tool since 2013, as you may verify by reading this instructions page.
Install with Composer Install with Composer
 Version Control Unique User Downloads Download Rankings  
 100%
Total:423
This week:0
All time:6,376
This week:43Up
 User Ratings  
 
 All time
Utility:100%StarStarStarStarStarStar
Consistency:93%StarStarStarStarStar
Documentation:93%StarStarStarStarStar
Examples:100%StarStarStarStarStarStar
Tests:-
Videos:-
Overall:78%StarStarStarStar
Rank:36