An easy to use wrapper for the iPlayer download API written in PHP.
resources/
src/
tests/
vendor/
Via Composer
$ composer require pxgamer/getiplayer-php
This currently creates a single .ts file which can be encoded using Handbrake or another encoder.
use pxgamer\GetiPlayer;
$client = new GetiPlayer\Client();
echo 'Episode URL: ' . $client->setUrl('https://www.bbc.co.uk/iplayer/episode/b088ppll/sherlock-series-4-2-the-lying-detective') . "\n";
echo 'Video ID: ' . $client->getVideoId() . "\n";
echo 'Output Quality: ' . $client->setQuality('highish') . "\n";
$client->getMediaISM();
echo 'Discovered URL: ' . $client->discoveredUrl . "\n";
echo 'Master Key: ' . $client->getMasterKey() . "\n";
$client->getM3u8();
$client->getStream();
//echo "M3u8: " . $client->getM3u8() . "\n";
//echo "M3u8 Stream: " . $client->getStream() . "\n";
echo 'Programme ID: ' . $client->getProgrammeId() . "\n";
echo 'Programme Title: ' . $client->getFullProgramTitle() . "\n";
$client->listHlsFiles();
$client->createDirectories();
echo 'Parsed: ' . $client->downloadFiles($client->hlsFiles) . "\n";
echo 'Files written: ' . $client->writeFiles() . "\n";
$client->cleanDirectory();
echo "Cleaned directory\n";
Note: This is based off of Tiiveni's original code from SquarePenguin.
Please see CHANGELOG for more information on what has changed recently.
$ composer test
Please see CONTRIBUTING and CODE_OF_CONDUCT for details.
If you discover any security related issues, please email [email protected] instead of using the issue tracker.
The MIT License (MIT). Please see License File for more information.