optimumsage / m3u-parser-php
This will parse m3u files and convert them to array or json
Installs: 18
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 1
Forks: 0
Open Issues: 0
pkg:composer/optimumsage/m3u-parser-php
This package is auto-updated.
Last update: 2025-12-17 17:48:31 UTC
README
This library helps you parse m3u files from url or text.
Install
composer require optimumsage/m3u-parser-php
Usage
use OptimumSage\M3uParser\M3uParser; ... $data = M3uParser::fromUrl([ 'https://iptv-org.github.io/iptv/categories/animation.m3u', 'https://iptv-org.github.io/iptv/categories/business.m3u' ])->get(); ... $data = M3uParser::fromUrl('https://iptv-org.github.io/iptv/index.m3u')->get(); // returns stdClass ... $data = M3uParser::fromUrl('https://iptv-org.github.io/iptv/index.m3u')->toArray(); // return array ... $data = M3uParser::fromUrl('https://iptv-org.github.io/iptv/index.m3u')->toJson(); // return json