Coder Social home page Coder Social logo

lingkong-chatapi's Introduction

Lingkong-ChatApi

轻量级的留言板api,使用Mysql

灵感:来自于某个秘密QQ群,被启发所做出的

(特别感谢那位“预言帝”,预言一下彩票可否啊亲?)

语言使用php动态网页语言,暂时只可以做到以下几种选项(如果不够你可以自己修改) (我开发用的是php7.4和mysql5)

选项(o) 描述
v Version,版本信息
r reload,在数据库内安装ChatApi
a add,在数据库内新建一个apikey
l list,列出指定apikey中的留言,返回为json
n new,在指定apikey中新建留言
参数 描述 是否必填
passwd 管理员密码,可在index.php中设置 在使用r和a选项时必填
o option,选项 必填
r reload,r选项的设置 当使用自定义数据库时必须填no_CD,no_CD指的是不创建chatapi数据库,在开头设置的数据库内直接安装
apikey 在使用a选项时返回的随机字符串 在l和n两个选项中必填
text 留言内容 在n选项中必填

1.如何初始化?

很简单,只需要把下面这个链接使用get方法打开就可以

http://xxx/index.php?o=r&passwd=Ab1234

其中xxx是你的网页链接

l选项返回值的实例

[{"TEXT":"test","reg_date":"2020-05-19 14:22:43"},{"TEXT":"test","reg_date":"2020-05-19 14:23:12"}]

TEXT就是留言内容,reg_date就是留言时间。上述示例中有两个留言,内容为text

使用get方式获取运行结果也好,浏览器直接访问也可以

index.php开头有配置用的,使用前需先去那里配置好

如有任何使用问题可以评论或者新建一个问题

What you laughed at me yesterday, I turned it into motivation today.
And I will never forget the "power" you gave me.
Don't forget that there are more powerful people besides you, and don't be arrogant.
Otherwise that's how you get in the way of yourself.
:)

lingkong-chatapi's People

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.