Web Programming Final Project
Creating multiplatform applications: Website-Bot Register for new member registration of UPN Veteran Jatim Robotics community.
Part | Description |
---|---|
Features | • Create • Read • Update • Delete • Search • Count Data • Validation • Refresh Page • Error Handling |
Framework | • Bootstrap 4 • Botman |
Tools | • Xampp • Composer • Git • Ngrok |
-
XAMPP with PHP version 7.4
https://bit.ly/XAMPP_PHP7_Installer
-
Ngrok
https://bit.ly/NGROK_Installer
-
Composer
https://bit.ly/Composer_Installer
-
Git
https://bit.ly/GIT_Installer
-
Open
XAMPP
, then start theApache
&MySQL
section. This aims to be able to support the website optimally. -
Access the browser first in order to open the database admin panel, please copy the following link:
localhost/phpmyadmin/
. -
Create a database called
wb_register
on local. -
Open the
wb_register
database and Import theWB_Register_db.sql
in theWB-Register/assets/sql
directory.
-
Download this repository and extract it.
-
Move the
WB-Register
directory into thehtdocs
directory, whose details you can find out as follows:C:\xampp\htdocs
. -
Create an Ngrok account first on the following page: https://dashboard.ngrok.com/login.
-
Connect the ngrok account in the following way:
ngrok config add-authtoken [YOUR NGROK AUTHTOKEN]
-
Open the
ngrok.yml
file in theC:\Users\[User Name]\AppData\Local\ngrok
directory, then set the tunnels to be used for multiple ports in one go by writing this command in it:version: "2" authtoken: [YOUR NGROK AUTHTOKEN] tunnels: tunnel-1: proto: http addr: 80 schemes: ["https"] tunnel-2: proto: http addr: 80 schemes: ["http", "https"]
-
Type the following command into
NGROK.exe
and press enter:ngrok start --all
-
Copy the
https URL
inNGROK
, and paste the URL into the following folder (directory):WB-Register -> url_ngrok -> generate_url (Note: url is only valid for one way)
. -
Copy your
Telegram Bot API
from@BotFather
and paste it into the following folder (directory):WB-Register -> multiplatform -> tgbot -> private -> token.txt
. -
Open your
browser
, then type a command with the following rules to run the web:[URL Https NGROK]/WB-Register/
.• Writing example:
https://e6e5-2001-448a-5021-617-ecb0-7d4d-1d9e-27f2.ngrok-free.app/WB-Register/
-
Click ->
Visit Site
. -
Open
CMD (Command Prompt)
and type the command with the following rules to run the bot:curl -d url=[URL Https NGROK]/[Folders If Any]/bot.php -X POST https://api.telegram.org/bot[TOKEN]/setWebhook
.• Writing example:
curl -d url=https://e6e5-2001-448a-5021-617-ecb0-7d4d-1d9e-27f2.ngrok-free.app/Cryptodax-Bot/bot.php -X POST https://api.telegram.org/bot1496456979:AAE7MCBAeRznBN3G-E4J65GgVYzHo0oZmog/setWebhook
• The result will appear (Bot sign is already working / active):
{"ok":true,"result":true,"description":"Webhook was set"}
. -
If you want to complete the running
webhook session
, then please open thebrowser
by typing the following command:https://api.telegram.org/bot[TOKEN]/setWebhook
-
Forgot to run
apache
andsql
inXAMPP
or there could be a problem in yourNgrok settings
. You can see an example of the problem as shown below:
-
The problem that usually occurs with Botman-based telegram bots is when the user has left the bot for a long period of time, this can cause the
API Token to expire
. This problem is usually characterized by anabnormal state of the telegram bot
, for example when the user gives the command/start
or other commands, this bot still does not respond. The solution to this problem is that youonly need to create a new telegram bot again
(automatically get a new API Token), then for the program code, please set it based on your own needs. -
If the problem in point 2 is not resolved, then you should :
• Delete 3 files in the
C:\xampp\htdocs\WB-Register\multiplatform\tgbot
directory, namelycomposer.json
,composer.lock
, andvendor
.• Install the
Botman
depedency viaGitBash
by giving the following command:composer require "botman/driver-telegram"
NUMBER | FULL NAME | NPM |
---|---|---|
1 | Devan Cakra Mudra Wijaya | 18081010013 |
2 | Tasya Ardhian Nisaa' | 18081010049 |
3 | Susy Rahmawati | 18081010048 |
Create | Read | Update |
---|---|---|
Delete | Search |
---|---|
Telegram Bot | |||||
---|---|---|---|---|---|
Via Telegram: @roboticsupnjt_bot
If this work is useful to you, then support this work as a form of appreciation to the author by clicking the ⭐Star
button at the top of the repository.
This application is the result of my work with my team and is not the result of plagiarism from other people's research or work, except those related to third party services which include: libraries, frameworks, and so on.
MIT License - Copyright © 2021 - Devan C. M. Wijaya et al
Permission is hereby granted without charge to any person obtaining a copy of this software and the software-related documentation files to deal in them without restriction, including without limitation the right to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons receiving the Software to be furnished therewith on the following terms:
The above copyright notice and this permission notice must accompany all copies or substantial portions of the Software.
IN ANY EVENT, THE AUTHOR OR COPYRIGHT HOLDER HEREIN RETAINS FULL OWNERSHIP RIGHTS. THE SOFTWARE IS PROVIDED AS IS, WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, THEREFORE IF ANY DAMAGE, LOSS, OR OTHERWISE ARISES FROM THE USE OR OTHER DEALINGS IN THE SOFTWARE, THE AUTHOR OR COPYRIGHT HOLDER SHALL NOT BE LIABLE, AS THE USE OF THE SOFTWARE IS NOT COMPELLED AT ALL, SO THE RISK IS YOUR OWN.