Code Monkey home page Code Monkey logo

ncov-push's Introduction

nCoV-push

nCoV疫情实时播报推送脚本。数据基于丁香园。

使用说明

环境要求

  • php7 以上
  • 当前目录可写

推送配置

Server酱

第一行,将「"填写SendKey"」换成你的 sendkey 即可。

define("SCKEY", "填写SendKey");

其他

在42行处,添加推送函数即可,$title 为标题,$content 为内容。

print_r(sc_send($title, $content, SCKEY));

定时访问

然后定时访问本页面即可。可以通过 cron 、云平台的定时任务等方式操作。

*/5 * * * * /usr/local/bin/php cron.php >/dev/null 2>&1

注意丁香园的页面因为访问频繁且长,经常出现一半内容返回的情况,这时候提取函数会失败。要考虑重试。

ncov-push's People

Contributors

easychen avatar sy-records 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.