1. Go to this page and download the library: Download homer/yunba-push library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
homer / yunba-push example snippets
use Homer\Push\Yunba\Service as YunbaPushService;
$service = new YunbaPushService('appkey', 'secretkey');
// - or the full version
// $service = new YunbaPushService('appkey', 'secretkey', $optionsOfService, $instanceOfClient);
// push to topic
$service->pushToTopic('topic', 'message', $options);
$service->pushToTopicAsync('topic', 'message', $options);
// push to alias
$service->pushToAlias($alias_or_aliases, 'message', $options);
// check async topic message status
$service->checkAsyncTopicMessage('topic', 'message_id');
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.