php pushwoosh
1.9.0
一個 PHP 函式庫,可使用 Pushwoosh REST Web 服務輕鬆發送推播通知。
// Create a Pushwoosh client
$ pushwoosh = Pushwoosh:: create ()
-> setApplication ( ' XXXX-XXX ' )
-> setAuth ( ' xxxxxxxx ' );
// Create a request for the '/createMessage' Web Service
$ request = CreateMessageRequest:: create ()
-> addNotification (Notification:: create ()-> setContent ( ' Hello Jean ! ' ));
// Call the REST Web Service
$ response = $ pushwoosh -> createMessage ( $ request );
// Check if its ok
if ( $ response -> isOk ()) {
print ' Great, my message has been sent ! ' ;
} else {
print ' Oups, the sent failed :-( ' ;
print ' Status code : ' . $ response -> getStatusCode ();
print ' Status message : ' . $ response -> getStatusMessage ();
}
很容易,不是嗎?
如果您已將 php-pushwoosh 整合到流行的 PHP 框架中,請告訴我們!
在 Gomoob,我們每天使用出色的開源框架來建立高品質的軟體。您想與我們一起開始您的下一個專案嗎?那太棒了!給我們打電話或給我們發送電子郵件,我們會盡快回覆您!
您可以透過電子郵件 [email protected] 或電話號碼 (+33) 6 85 12 81 26 或 (+33) 6 28 35 04 49 與我們聯絡。
也請造訪 http://gomoob.github.io 以發現我們開發的更多開源軟體。