All Projects → HMS-Core → hms-push-serverdemo-php

HMS-Core / hms-push-serverdemo-php

Licence: Apache-2.0 license
PHP sample code encapsulates APIs of the HUAWEI Push Kit server.It provides many sample PHP programs about quick access to HUAWEI Push Kit for your reference or usage.

Programming Languages

PHP
23972 projects - #3 most used programming language

Projects that are alternatives of or similar to hms-push-serverdemo-php

hms-push-serverdemo-java
Java sample code encapsulates APIs of the HUAWEI Push Kit server. It provides many sample programs for your reference or usage.
Stars: ✭ 39 (+85.71%)
Mutual labels:  push-notifications, push, huawei, hms, sever, sendmessage
hms-push-serverdemo-csharp
C# sample code encapsulates APIs of the HUAWEI Push Kit server. It provides many sample programs for your reference or usage.
Stars: ✭ 25 (+19.05%)
Mutual labels:  push-notifications, push, huawei, hms, sendmessage
hms-cordova-plugin
This repo contains all of Cordova HMS plugins.
Stars: ✭ 78 (+271.43%)
Mutual labels:  push-notifications, push, huawei, hms
hms-react-native-plugin
This repo contains all of React-Native HMS plugins.
Stars: ✭ 167 (+695.24%)
Mutual labels:  push-notifications, push, huawei, hms
Onepush
消息推送用OnePush,就够了!
Stars: ✭ 1,401 (+6571.43%)
Mutual labels:  push-notifications, push, huawei
spontit-api-python-wrapper
Send functional, flexible push notifications to iOS, Android, and desktop devices (without your own app or website).
Stars: ✭ 35 (+66.67%)
Mutual labels:  push-notifications, push
xinge
腾讯信鸽push Golang lib
Stars: ✭ 25 (+19.05%)
Mutual labels:  push-notifications, push
Socket.io Push
整合了小米,华为,友盟,谷歌,苹果推送的统一解决方案
Stars: ✭ 605 (+2780.95%)
Mutual labels:  push-notifications, push
Notificationpusher
Standalone PHP library for easy devices notifications push.
Stars: ✭ 1,143 (+5342.86%)
Mutual labels:  push-notifications, push
mobile-messaging-sdk-ios
Mobile Messaging SDK for iOS
Stars: ✭ 45 (+114.29%)
Mutual labels:  push-notifications, push
Easynotifylibproject
Send firebase notifications to your users very easily: A new Android Lib
Stars: ✭ 31 (+47.62%)
Mutual labels:  push-notifications, push
Push.js
The world's most versatile desktop notifications framework 🌎
Stars: ✭ 8,536 (+40547.62%)
Mutual labels:  push-notifications, push
hms-audio-demo
HMS audio android sample code encapsulates APIs of the HUAWEI Audio Kit, which focuses on audio playback, audio effects and audio data.
Stars: ✭ 20 (-4.76%)
Mutual labels:  huawei, hms
hms-audio-editor-demo
HUAWEI Audio Kit provides a wide range of audio editing capabilities, including auido import/export/editing/extracting and format conversion. This sample code describes how to integrate the Audio Editor Kit SDK.
Stars: ✭ 24 (+14.29%)
Mutual labels:  huawei, hms
ejabberd mod apns
An ejabberd module to send PUSH messages to iOS devices through APNS
Stars: ✭ 31 (+47.62%)
Mutual labels:  push-notifications, push
andpush
Android Push Notification in Ruby: The fastest client for FCM (Firebase Cloud Messaging)
Stars: ✭ 83 (+295.24%)
Mutual labels:  push-notifications, push
Ng Toolkit
⭐️ Angular tool-box! Start your PWA in two steps! Add Serverless support for existing projects and much more
Stars: ✭ 1,116 (+5214.29%)
Mutual labels:  push-notifications, push
mobile-messaging-cordova-plugin
Mobile Messaging SDK plugin for Cordova projects
Stars: ✭ 19 (-9.52%)
Mutual labels:  push-notifications, huawei
React Native Onesignal
React Native Library for OneSignal Push Notifications Service
Stars: ✭ 1,270 (+5947.62%)
Mutual labels:  push-notifications, push
Vue Push Notification Example
An example repo for using browser push notifications with Vue.js and Firebase
Stars: ✭ 120 (+471.43%)
Mutual labels:  push-notifications, push

HMS Pushkit PHP Severdemo

English | 中文

Table of Contents

Introduction

PHP sample code encapsulates APIs of the HUAWEI Push Kit server.It provides many sample PHP programs about quick access to HUAWEI Push Kit for your reference or usage.
The following table describes packages of PHP sample code.

Package Description
examples Sample code files. Each PHP file can run independently.
push_admin Package where APIs of the HUAWEI Push Kit server are
encapsulated.

Installation

Before using PHP sample code, check whether the PHP environment has been installed.

Supported Environments

The PHP sample code is debugged based on the XAMPP (MySQL + PHP + PERL) 5.6.26 development suite.

Configuration

The following table describes parameters of the __construct method.

Parameter Description
appid App ID, which is obtained from app information.
appsecret Secret access key of an app, which is obtained from app information.
access_token URL for the Huawei OAuth 2.0 service to obtain a token,
please refer to Generating an App-Level Access Token.
hw_token_server URL for accessing HUAWEI Push Kit, please refer to Sending Messages.

Sample Code

PHP sample code uses the Application structure in the push_admin package as the entry.
Core methods in the Application structure are used to call APIs of the HUAWEI Push Kit server.
The following table lists methods in Application.

Method Description
push_send_msg Sends a message to a device.
common_send_msg Subscribes to a topic, unsubscribes from a topic,
and queries the list of topics subscribed by a device.
__construc Constructor, which obtains key data for sending a message.

1.Send an Android data message.

Code location: examples/test_sample_push_passthrouth_msg.php

2.Send an Android notification message.

Code location: examples/test_sample_push_notification_msg.php

3.Send a message by topic.

Code location: examples/test_sample_push_topic_msg.php

4.Send a message by conditions.

Code location: examples/test_sample_push_condition_msg.php

5.Send a message to a Huawei quick app.

Code location: examples/test_sample_push_instantce_app_msg.php

6.Send a message through the WebPush agent.

Code location: examples/test_sample_push_webpush_msg.php

7.Send a message through the APNs agent.

Code location: examples/test_sample_apns_msg.php

8.Send a test message.

Code location: examples/test_sample_test_push_msg.php

Technical Support

If you want to evaluate more about HMS Core, r/HMSCore on Reddit is for you to keep up with latest news about HMS Core, and to exchange insights with other developers.

If you have questions about how to use HMS samples, try the following options:

  • Stack Overflow is the best place for any programming questions. Be sure to tag your question with huawei-mobile-services.
  • Huawei Developer Forum HMS Core Module is great for general questions, or seeking recommendations and opinions.

If you run into a bug in our samples, please submit an issue to the Repository. Even better you can submit a Pull Request with a fix.

License

Pushkit PHP sample is licensed under the Apache License, version 2.0.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].