Giter Site home page Giter Site logo

tiancityycf / jpush-api-php-client Goto Github PK

View Code? Open in Web Editor NEW

This project forked from jpush/jpush-api-php-client

0.0 2.0 0.0 503 KB

JPush's officially supported PHP client library for accessing JPush APIs. 极光推送官方支持的 PHP 版本服务器端 SDK。

Home Page: http://docs.jpush.cn

jpush-api-php-client's Introduction

JPush API client library for PHP

概述

这是 JPush REST API 的 PHP 版本封装开发包,是由极光推送官方提供的,一般支持最新的 API 功能。

对应的 REST API 文档:http://docs.jpush.cn/display/dev/REST+API

环境配置

PHP 配置支持 SSL

Windows 系统中配置

  • 在 php.ini 中 extension=php_openssl.dll 去掉前面的注释。(可参考 examples/ 目录下的 php.ini 文件)。
  • 复制 php 安装目录中的 libeay32.dll, ssleay32.dll 至 Windows 机器的 c:\windows\system32 目录。
  • 复制 php 安装目录的ext子目录中 php_openssl.dll 至 Windows 机器的 c:\windows\system32 目录。
  • 重启服务器 IIS 或者 Apache。

Linux 系统中配置

  • 安装 openssl。
  • 如果当前的 PHP 版本未支持 SSL,需要重新编译安装 PHP 以支持。请 Google 文档了解。
  • 重启 Apache。

使用样例

推送样例


$client = new JPushClient($app_key,$master_secret);
$extras = array();
$params = array("receiver_type" => 2,
                "receiver_value" => "tag_api",
                "sendno" => 1,
                "send_description" => "",
                "override_msg_id" => "");
//发送通知
$msgResult1 = $client->sendNotification("tag notify content", $params, $extras);

//发送自定义信息
$msgResult2 = $client->sendCustomMessage("tag title","tag notify content", $params, $extras);

统计获取样例

$client = new JPushClient($app_key,$master_secret);
$msg_ids = "123, 12345, ";
$msgstr = $client->getReportReceiveds($msg_ids);

版本更新

Release页面 有详细的版本发布记录与下载。

jpush-api-php-client's People

Contributors

javenfang avatar zincal8 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.