1. Go to this page and download the library: Download akaramires/m3u-parser library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
akaramires / m3u-parser example snippets
use Akaramires\M3uParser\Processors\PlaylistProcessor;
use Akaramires\M3uParser\Sources\FileSource;
...
$source = new FileSource(__DIR__ . '/../Data/playlist.m3u');
/** @var PlaylistProcessor $processor */
$processor = app(PlaylistProcessor::class);
$processor->load($source);
$processor->parse();
$playlist = $processor->getPlaylist();