[Push Notifications]Push Notifications Based on Umeng Service

When the server interacts with mobile clients, it often needs to push messages from the server to the user’s mobile device. Umeng provides such a push notification service — UPush.

Download the SDK code. Based on the demo, this article provides a simple ThinkPHP integration.

1
2
3
4
5
6
$appkey = "your app key";
$secret = "your app secret";
import('@.ORG.Notification');
$notification = new Notification($appkey, $secret);
$custom_data = array($key=>$value);
$notification->sendIOSBroadcast($your_title, $custom_data);

Notification.class.php is the demo.php from the SDK, encapsulated into ThinkPHP’s ORG folder.
If you have any questions, feel free to leave a comment below. I typically reply once a day.