oxmohsen/validating-data
Composer 安装命令:
composer require oxmohsen/validating-data
包简介
example of how to validate incoming data from web app telegram bot to ensure that the data is come from telegram.
README 文档
README
validating-data
project to validate telegram web app data.
Example
·
Report Bug
·
Request Feature
Table of Contents
About The Project
| valid data | invalid data |
|---|---|
![]() |
![]() |
php code for validating incoming data from telegram web app bot to ensure that the data is valid and comes from the telegram. in example folder you can see how to use this code by using ajax and php.
Built With
Getting Started
These instructions will get you a copy of the project and show you how to use it. You'll need Git and composer
Installation
-
using composer
composer require oxmohsen/validating-data
-
install manually
- Clone the repo
git clone https://github.com/OxMohsen/validating-data.git
- move to the directory
cd validating-data - Install composer packages
composer install
- Clone the repo
Usage
- load the project
require_once __DIR__ . '/vendor/autoload.php'; use OxMohsen\TgBot\Validate;
- use the Validate class to validate initData
if (Validate::isSafe($bot_token, $initData)) { echo 'valid data'; } else { echo 'invalid data'; }
you can also see a simple example in the example folder.
Contributing
Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature) - Commit your Changes (
git commit -m 'Add some AmazingFeature') - Push to the Branch (
git push origin feature/AmazingFeature) - Open a Pull Request
License
Distributed under the MIT License. See LICENSE for more information.
Contact
Mohsen Falakedin - @oxmohsen - oxmohsen@oxmohsen.ir
Project Link: https://github.com/OxMohsen/validating-data
oxmohsen/validating-data 适用场景与选型建议
oxmohsen/validating-data 是一款 基于 JavaScript 开发的 Composer 扩展包,目前已累计 2.78k 次下载、GitHub Stars 达 35, 最近一次更新时间为 2022 年 07 月 07 日, 在 PHP 生态内属于活跃度较高的组件。
我们在过去多个企业项目中使用过 oxmohsen/validating-data 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 oxmohsen/validating-data 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
统计信息
- 总下载量: 2.78k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 35
- 点击次数: 17
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2022-07-07

