Git Product home page Git Product logo

graphbot's Introduction

GraphBot

A Telegram PHP bot that returns statistics on traffic messages in a group chat in the last 24 hours

In this mini-guide you will NOT learn on how to create a Telegram Bot or configure a webhook

Download jpgraph libraries

Download jpgraph libraries and add them to your project in order to allow graphBot.php to create the graph image.

Set-up graphBot.php

After downloaded the project, change in graphBot.php the settings in order to make it able to connect to your relational database. You can also customize your generated graph layout, dimensions, line colors, ecc...

Load mysql procedure into phpMyAdmin

Import source.sql into phpMyAdmin. It allows to count messagges incoming from chats and to create chat 24-hour tables for groups when the bot is added to a group chat.

Schedule crontab job

Edit remove.php in accordance with your database settings and schedule a crontab job in order to allow it be executed every hour. It keep database tables updated with current (server) time in order to allow you see always past 24 hour statistics.

Main encountered problems consists in a jpgraph library bug (find solution on the web) and on settings ownering of files and folder in order to allow the executions of automated cronjob and bot tasks

graphbot's People

Contributors

devsoft91 avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

graphbot's Issues

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.