Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/elliotjreed/web-server-health-check
A simple PHP application to take an XML sitemap URL and check all links for their HTTP status codes and response times, using PSR-7-compatible logging via Monolog.
https://github.com/elliotjreed/web-server-health-check
http php sitemap
Last synced: 3 months ago
JSON representation
A simple PHP application to take an XML sitemap URL and check all links for their HTTP status codes and response times, using PSR-7-compatible logging via Monolog.
- Host: GitHub
- URL: https://github.com/elliotjreed/web-server-health-check
- Owner: elliotjreed
- License: mit
- Created: 2018-11-13T21:24:34.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2023-12-16T08:26:44.000Z (about 1 year ago)
- Last Synced: 2023-12-16T09:52:36.895Z (about 1 year ago)
- Topics: http, php, sitemap
- Language: PHP
- Homepage: https://www.elliotjreed.com
- Size: 377 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[![Build Status](https://travis-ci.org/elliotjreed/web-server-health-check.svg?branch=master)](https://travis-ci.org/elliotjreed/web-server-health-check)[![Coverage Status](https://coveralls.io/repos/github/elliotjreed/web-server-health-check/badge.svg?branch=master)](https://coveralls.io/github/elliotjreed/web-server-health-check?branch=master)
# Web Server Health Checker
An application to check the response of URLs from a provided XML sitemap URL.
## Getting Started
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.
### Prerequisites
This package requires:
- PHP 8.2+
- [Composer](https://getcomposer.org/)### Installing
To install the required dependencies, run:
```bash
composer install
```## Running the tests
To run the unit tests and code sniffer checks, run:
```bash
composer run-script test
```To run the unit tests, run:
```bash
composer run-script phpunit
```To run the code sniffer, run:
```bash
composer run-script phpcs
```## Usage
To check for HTTP responses of 400 or greater (ie. there's something wrong), run:
```bash
php bin/check.php https://www.example.net/sitemap.xml
```To check all HTTP responses and report on their response times, run:
```bash
php bin/check.php https://www.example.net/sitemap.xml -v
```## Building Phar
To build a self-contained `phar` file you will need `box` locally. To download `box` run:
```bash
curl -LSs https://box-project.github.io/box2/installer.php | php
```To compile the project to `bin/healthcheck.phar` run:
```bash
php ./box.phar build
```## Built With
- [PHP](https://secure.php.net/)
- [PHPUnit](https://phpunit.de/) - Unit Testing
- [Composer](https://getcomposer.org/) - Dependency Management