mirror of
https://github.com/easychen/pushdeer.git
synced 2025-01-07 21:45:54 +08:00
修改readme,添加example目录
This commit is contained in:
parent
9114bc6879
commit
7677c81ce8
24
README.md
24
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)
|
||||
|
20
examples/demo.php
Normal file
20
examples/demo.php
Normal file
@ -0,0 +1,20 @@
|
||||
<?php
|
||||
|
||||
// 调用函数
|
||||
function pushdeer_send($text, $desp = '', $type='text', $key = '[PUSHKEY]')
|
||||
{
|
||||
$postdata = http_build_query(array( 'text' => $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...'));
|
Loading…
Reference in New Issue
Block a user