Recommend this page to a friend! |
![]() |
Info | Documentation | ![]() |
![]() |
![]() |
Reputation | Support forum | Blog | Links |
Ratings | Unique User Downloads | Download Rankings | ||||
![]() ![]() ![]() ![]() | Total: 423 | All time: 6,376 This week: 43![]() |
Version | License | PHP version | Categories | |||
simplepush 1.0.0 | GNU General Publi... | 5 | Email, PHP 5, Wireless and Mobile |
Description | Author | |
This package can send email messages or to Android and iOS devices. |
|
What is the best PHP push notification for web class?
Push notification for Web applications
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();
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();
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();
![]() |
File | Role | Description | ||
---|---|---|---|---|
![]() |
||||
![]() |
||||
![]() ![]() |
Data | Auxiliary data | ||
![]() ![]() |
Data | Auxiliary data | ||
![]() |
Class | Class source | ||
![]() |
Class | Class source | ||
![]() |
Class | Class source | ||
![]() |
Class | Class source | ||
![]() ![]() |
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. |
![]() |
Version Control | Unique User Downloads | Download Rankings | |||||||||||||||
100% |
|
|
User Ratings | ||||||||||||||||||||||||||||||
|
Applications that use this package |
If you know an application of this package, send a message to the author to add a link here.