PHP code example of yuqinglan / jg-push

1. Go to this page and download the library: Download yuqinglan/jg-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/ */

    

yuqinglan / jg-push example snippets




ey = 'your-app-key';
$masterSecret = 'your-master-secret';

$alert = 'Hi JPush!';
$extras = [
    'type' => 1,
    'url' => 'http://www.mayanlong.com'
];
$platform = ['android', 'ios'];
$audience = [
    'alias' => ['13888888888']
];

$push = new zhangjian\Push\JPush($appKey, $masterSecret);
$push->push($alert, $extras, $platform, $audience);