optimumsage / m3u-parser-php
This will parse m3u files and convert them to array or json
1.0.0
2022-06-16 18:51 UTC
This package is auto-updated.
Last update: 2024-10-17 15:29:16 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