From 7677c81ce80aa9146811141ff1609ce1ccabf77d Mon Sep 17 00:00:00 2001 From: Easy Date: Wed, 23 Feb 2022 00:41:25 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9readme=EF=BC=8C=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0example=E7=9B=AE=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 24 +++++++++++++----------- examples/demo.php | 20 ++++++++++++++++++++ 2 files changed, 33 insertions(+), 11 deletions(-) create mode 100644 examples/demo.php diff --git a/README.md b/README.md index e75baaa..006a887 100644 --- a/README.md +++ b/README.md @@ -1,23 +1,25 @@ -PushDeer是一个可以自行架设的无APP推送服务。 +PushDeer是一个可以自行架设的无APP推送服务,同时也为因为某些原因无法使用无APP推送方案的同学提供有APP/自制设备方案。 -当前状态:API、iOS、Android和Mac第一版已完成,快应用正在开发🚧 +[🐙🐱 GitHub仓库](https://github.com/easychen/pushdeer) [🔮 中国大陆镜像仓库@Gitee](https://gitee.com/easychen/pushdeer) -**🔥 全新子项目 DeerESP 推送消息到自制设备** +本项目已经实现的方案/端包括: - - -|||| -|-|-|-| -|[👨🏻‍🏫 教程](iot/README.md)|[⌨️ 源码](iot/deeresp/)|[📼 演示视频,可以听到提示音♪](https://weibo.com/1088413295/LfUwivPoh)| +- 无APP方案: + - 轻APP(APP Clip) + - 快应用 +- 有APP方案: + - iOS客户端 + - Mac客户端 + - Android客户端 +- 自制设备方案: + - DeerESP(ESP8266/ESP32) ![](iot/image/deeresp.gif) -👉[点此查看如何将消息推送到成本35元左右的自制设备上](iot/README.md) +👉[点此查看如何将PushDeer消息推送到成本不到40元的自制设备上](iot/README.md) --- -[🐙🐱 GitHub仓库](https://github.com/easychen/pushdeer) [🔮 中国大陆镜像仓库@Gitee](https://gitee.com/easychen/pushdeer) - |登入|设备|Key|消息|设置| |-|-|-|-|-| |![](doc/design_and_resource/登入.png)|![](doc/design_and_resource/设备.png)|![](doc/design_and_resource/key.png)|![](doc/design_and_resource/消息.png)|![](doc/design_and_resource/设置.png) diff --git a/examples/demo.php b/examples/demo.php new file mode 100644 index 0000000..416f9dc --- /dev/null +++ b/examples/demo.php @@ -0,0 +1,20 @@ + $text, 'desp' => $desp, 'type' => $type , 'pushkey' => $key )); + $opts = array('http' => + array( + 'method' => 'POST', + 'header' => 'Content-type: application/x-www-form-urlencoded', + 'content' => $postdata)); + + $context = stream_context_create($opts); + return $result = file_get_contents('https://api2.pushdeer.com/message/push', false, $context); +} + + + +// 使用实例 +print_r(pushdeer_send('服务器又宕机了主人', '', 'text', 'PDU...'));