iamxnuel/http-utility

Plain PHP HTTP utilities including Basic and Digest authentication, ideal for MJPEG streaming and REST APIs requiring authentication.

Installs: 1

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 0

Forks: 0

Open Issues: 0

pkg:composer/iamxnuel/http-utility

v1.0.0 2025-10-20 10:38 UTC

This package is auto-updated.

Last update: 2025-10-20 10:44:10 UTC


README

PHP Version

HTTPUtility is a lightweight PHP library providing HTTP utilities, including Basic and Digest authentication handling, and tools for parsing HTTP headers.

This library was originally created to support MJPEG Restreaming from cameras that only support Digest authentication, as no existing solution fit this use case at the time. It is still useful for any REST API or HTTP client requiring authenticated requests.

Features

  • Parse raw HTTP headers into structured arrays.
  • Extract HTTP response codes and statuses.
  • Parse WWW-Authenticate headers.
  • Handle Basic authentication headers.
  • Handle Digest authentication headers including nonce, cnonce, and qop.
  • Build authorization headers for HTTP clients.
  • Compatible with any PHP project using PHP 8+.

Installation

Install via Composer:

composer require iamxnuel/http-utility