Download the PHP package alexleotz/necta-results-scraper without Composer
On this page you can find all versions of the php package alexleotz/necta-results-scraper. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download alexleotz/necta-results-scraper
More information about alexleotz/necta-results-scraper
Files in alexleotz/necta-results-scraper
Package necta-results-scraper
Short Description This package provides a PHP script that allows you to scrape students' results from the National Examinations Council of Tanzania (NECTA) website.
License MIT
Informations about the package necta-results-scraper
Necta Results Scraper
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:
Usage
Use the static results method of the NectaResultScraper class, passing the student's index number as argument.
Example usage:
Run the script from your terminal:
Output
The script returns the student's results in JSON format:
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:
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.
All versions of necta-results-scraper with dependencies
symfony/http-client Version ^6.2
symfony/browser-kit Version ^6.2
symfony/css-selector Version ^6.2