title//Push title, content//Push content account//Corresponding user token $type//Custom parameters
First go to the Xinge Pigeon official website to apply for the key, then access the key and quote XingeApp.php (the official website has Provided) Because the following method is the
ProteCTED FUNCCCOUN ($ Title, $ account, $ Type) {
$ Pushandroid = New Xingeapp (88888, '8888,' 888 '); $ $ pushios = new XingeApp(888888, '888888);
$mess = new Message();
$mess->setType(Message::TYPE_NOTIFICATION);
$mess->setTitle($title);
$mess-> setContent ($content);
Notification
$style = new Style(0, 1, 1, 1, 0);
$action = new ClickAction();
$action->setActionType(ClickAction::TYPE_ACTIVITY);
#Opening the url requires user confirmation
// $action->setComfirmOnUrl(0);
$mess->setStyle($style);
$mess->setAction($action);
$mess->setCustom(array('id' = > "", 'title' => "", 'type' => $type));
$messios = new MessageIOS();
$messios->setExpireTime(0);
$messios-> ;setAlert($content);
$messios->setBadge(1);
$messios->setSound("");
$messios->setCustom(array('id' => "", ' title' => "", 'content' => $content, 'type' => $type));
$acceptTime1 = new TimeInterval(0, 0, 23, 59);
$mess-> addAcceptTime($acceptTime1);
$ret = $pushAndroid->PushSingleAccount(0, $account, $mess);
$ret1 = $pushIOS->PushSingleAccount(0, $account, $messios, XingeApp::IOSENV_DEV) :
Copyright Statement: This article is an original article by the blogger and may not be reproduced without the blogger's permission.
The above introduces PHP pigeon push (for token push), including the relevant content. I hope it will be helpful to friends who are interested in PHP tutorials.