Search by

modjocams / live-cam-api-client

rkondour

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

This package is auto-updated.

Last update: 2026-11-21 14:52:22 UTC


README

License: MIT PHP Version Live Demo

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.

✨ 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 (< 15 live 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 OPcache tracing JIT 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.