Date: 02/11/2016
- Telegram Bot
- Version: 0.54.0
- name: {S}bot
- Mysql + Php + JQuery + Html with Linux or Windows
- Use the vmware player and the virtual disk. Downalod from: http://sbot.opensipa.it/ the virtual machine for run {S}bot in 5 minutes
- Writing tests: Community
- Browser: Internet Explorer 8+ , Firefox, WaterFox, Chrome, Safari
- http://sbot.opensipa.it
- Assistance: sbot.opensipa@gmail.com
- Search the bot in Telegram
- Code and conceive:
- Guion Matteo (www.guion78.com)
- Contributors of projects:
- Massimo Gorla (Mysql connection, Login, Php)
- Timothy Redaelli (PasswordHash function)
- Giampiero Marconetto (Send Mail for alert, Testing - very hot testing -)
-
Linux install:
-
Create one Bot, use this guide: https://core.telegram.org/bots#botfather and generate the Token:
-
The token is a string along the lines of 110201543:AAHdqTcvCH1vGWJxfSeofSAs0K5PALD saw that will be required to authorize the bot and send requests to the Bot API
-
Use the server Linux with Lamp (Php version 5.5 or higher with support for curl and mcrypt (apt-get install php5-mcrypt, apt-get install php5-curl and /etc/init.d/apache2 restart), mysql 5.5 or higher and apache)
-
Insert in config.sample.php the Token, user and pwd user mysql and define the path of INFO_PHOTO e SEND_PHOTO
-
If this is your first install rename config.sample.php to config.php
-
For ability mcrypt at php launch in the bash: "php5enmod mcrypt" and restart Apache or Server. This is very important for login in Sbot management.
-
Use telegram_base.sql in folder sql and install in your server Mysql (launch in DB telegram the instruction sql).
-
In /etc/rc.local your server Linux insert (in two row):
-
"php /var/www/_PATH_OF_FOLDER_SBOT/sbot/demone.php > /var/www/_PATH_OF_FOLDER_SBOT/sbot/sbotAdmin/log/sbot.log &
-
exit 0"
-
Delete the " " before inserting the file
-
"EXIT 0" -> for force the exit
-
If you want the send images to work directory upload_img must be writable (set to 777)
-
reboot Server linux.
-
Ok, the sbot is run and you to be working. User login: admin Password login: password
-
Windows install:
-
For install with Windows use the guide for Linux Server, but not configure rc.local. Configure Scheduled Tasks in Windows panel.
- BugFix and insert tracker user and create level user (admin, user)
- BugFix
- BugFix and clean a code
- New parameter for message exit and search with Google or my site if user not found responce.
- In config.php file deprecate variable: define('MESSAGE_NULL')
- Launch 11_update.sql
- BugFix and clean a code
- Implements the short link for send news ecc.
- Launch 10_update.sql
- Use the code html for send message in {S}Bot
- For more details: https://core.telegram.org/bots/api#formatting-options
- bold, bold
- italic, italic
- inline URL
inline fixed-width code
-
pre-formatted fixed-width code block
- This version control this error: [Error : 403 : Bot was blocked by the user]. In this case the user is delete from Sbot.
- Bug fix for version 0.40.
- New version permit the scheduler send.
- In Linux server create a crontab for launcher this script:
- #!/bin/bash
- /usr/bin/php -f /var/www/html/sbot/crontab.php > /dev/null 2>&1
- In Windows Server create a scheduled task from control pannel
- Implement send message into Channel Telegram.
- New version change the config file and demone. This versione permit the change buttonBot with web page.
- Notification of new posts by email. Ability to start and stop the demon. Ability to set parameters via mail interface.
- Modify the script for start demone: "php /var/www/_PATH_OF_FOLDER_SBOT/sbot/demone.php > /var/www/_PATH_OF_FOLDER_SBOT/sbot/sbotAdmin/log/sbot.log & exit 0"
- Bug Fix
- New table style, add possibility disable user in admin page setting
- Bug Fix
- Now is possibile search message with function
- Bug Fix
- Convert date format Europe/IT
- Add archive message function
- Bug Fix
- Insert change signature for user
- Launch 4_update.sql for update Db
- Sortable single column for table users
- Bug Fix
- Correct bug in scructure Db
- Launch 3_update.sql for update Db
- IMPORTANT: Change folder for log --> In /etc/rc.local your server Linux insert: "php /var/www/_PATH_OF_FOLDER_SBOT/sbot/demone.php > /var/www/_PATH_OF_FOLDER_SBOT/sbot/sbotAdmin/log/sbot.log, and restart Server linux.
- Corret error in config.sample.php and demone.php replace the file config
- Insert update
- change functionDB function dbLogTextSend
- change sendSingle.php add into dbLogTextSend ($testo_ricevuto,$_SESSION['username'],$MessageID, $utenti_messageID);
- change function dbLogTextFull()
- change sendSingle for connection with single message send
- change send for new functionDB dbLogTextSend
- disable button send message after one click
- add connection single user with single messag
- launch 2_update.sql
- Add page of insert multiuser
- Insert in single message signature of user to send message
- Update table admins and send_message (use 1_update.sql)