alexleotz/necta-results-scraper
Composer 安装命令:
composer require alexleotz/necta-results-scraper
包简介
This package provides a PHP script that allows you to scrape students' results from the National Examinations Council of Tanzania (NECTA) website.
关键字:
README 文档
README
This package provides a PHP script to scrape student results from the National Examinations Council of Tanzania (NECTA) website.
Requirements:
- PHP 7.0 or higher
- Composer
Installation
Install the package using Composer:
composer require alexleotz/necta-results-scraper
Usage
Use the static results method of the NectaResultScraper class, passing the student's index number as argument.
Example usage:
<?php require_once('vendor/autoload.php'); use NectaResultScraper\NectaResultScraper; // Retrieve O-Level (CSEE) results: $result = NectaResultScraper::results('S1832/0036/2024'); // only csee candidate is supported // Output the results as JSON: echo json_encode($result);
Run the script from your terminal:
php index.php
Output
The script returns the student's results in JSON format:
{
"gender": "M",
"division": "II",
"points": "19",
"subjects": [
"CIV",
"HIST",
"GEO",
"KISW",
"ENGL",
"ENG",
"PHY",
"CHEM",
"BIO",
"MATH"
],
"subjects_grades": {
"CIV": "C",
"HIST": "B",
"GEO": "C",
"KISW": "C",
"ENGL": "C",
"ENG": "C",
"PHY": "D",
"CHEM": "C",
"BIO": "B",
"MATH": "C"
},
"source": "https://matokeo.necta.go.tz/results/2024/csee/CSEE2024/CSEE2024/results/s1832.htm"
}
Index Number Format
The package supports index numbers in slash-separated (e.g., S1832/0036/2024) and dot-separated (e.g., S1832.0036.2024) formats. Input validation is handled internally.
Supported Years
This package supports result scraping for years from 2015 to the present.
Error Handling
- Result Not Found: If the student's results are not found, the script returns a JSON response with an
errormessage and a404status code. - Other Errors: For other errors, such as network issues or parsing errors, a JSON response with an
errormessage is returned.
Composer Stability
If you encounter the "Could not find a version" error, ensure your composer.json file includes:
{
"minimum-stability": "stable"
}
Then, run composer update again.
Contributing
Contributions are welcome! Fork the repository, create a feature branch, and submit a pull request. For personal support or inquiries, please contact 0748333586.
License
This package is released under the MIT License. See LICENSE for details.
alexleotz/necta-results-scraper 适用场景与选型建议
alexleotz/necta-results-scraper 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 49 次下载、GitHub Stars 达 0, 最近一次更新时间为 2023 年 04 月 10 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「necta」 「necta api」 「necta results」 「Tanzanian education」 「Tanzania examination council」 「NECTA integration」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 alexleotz/necta-results-scraper 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 alexleotz/necta-results-scraper 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 alexleotz/necta-results-scraper 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Generate Alfred 3 or 4 Workflow Results in PHP with a laugh.
A PSR-7 compatible library for making CRUD API endpoints
Extension providing tools to export results.
A presentable result printer for PHPUnit
An easy way execute logical statements over a none persisted results set in Laravel.
统计信息
- 总下载量: 49
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 33
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2023-04-10