modjocams / live-cam-api-client
High-performance PHP 8.4 client and flat-file JSON cache manager for live streaming APIs with SEO tag popularity filtering.
v1.0.0
2026-11-21 14:40 UTC
Requires
- php: >=8.2
- ext-curl: *
- ext-json: *
Requires (Dev)
None
Suggests
None
Provides
None
Conflicts
None
Replaces
None
README
A lightweight, zero-dependency PHP 8.4 library designed to fetch, normalize, and cache live streaming JSON feeds into ultra-fast flat-file indexes with built-in SEO Soft-404 protection (tag popularity threshold filtering).
🚀 Live Production Showcase
This library powers the real-time Server-Side Rendered (SSR) architecture of ModjoCams.com, achieving sub-15ms TTFB using PHP 8.4 OPcache JIT and Nginx FastCGI RAM caching.
- Live Production Application: https://modjocams.com/
- Dynamic XML Sitemap Output: https://modjocams.com/sitemap.xml
- SSR Category Routing Examples:
✨ Key Features
- Zero Database Overhead: Designed for
tmpfs/ RAM-disk flat-file JSON caching (models-cache.json&tags-cache.json), eliminating MySQL/Redis bottlenecks under high concurrent traffic. - SEO Soft-404 Prevention: Automatically filters out low-density tags (
< 15live streams online) so search engine crawlers only index rich category pages. - Strict Tag Sanitization: Normalizes raw hashtags into clean, canonical lowercase URL slugs.
- PHP 8.4 Ready: Strict typing (
declare(strict_types=1)), compatible with OPcachetracingJIT compilation.
📦 Installation
Install via Composer:
composer require modjocams/live-cam-api-client
🛠️ Quick Start
<?php declare(strict_types=1); require __DIR__ . '/vendor/autoload.php'; use ModjoCams\LiveCamClient\FeedClient; // Initialize client with a minimum threshold of 15 active streams per tag $client = new FeedClient( apiUrl: 'https://modjocams.com/api/models?limit=120', minTagPopularity: 15 ); $data = $client->fetchAndNormalize(); printf("Total active streams: %d\n", $data['total_models']); printf("Indexable SEO tags (>= 15 streams): %d\n", count($data['popular_tags']));
📄 License
Released under the MIT License. Maintained by the engineering team at ModjoCams.com.