pxgamer / getiplayer-php
An easy to use wrapper for the iPlayer download API written in PHP.
Fund package maintenance!
owenvoke
ecologi.com/owenvoke?gift-trees
Requires
- php: ^7.1
- ext-curl: *
Requires (Dev)
- phpunit/phpunit: ^6.4
- squizlabs/php_codesniffer: ^3.1
This package is auto-updated.
Last update: 2024-10-11 14:42:00 UTC
README
An easy to use wrapper for the iPlayer download API written in PHP.
Structure
resources/
src/
tests/
vendor/
Install
Via Composer
$ composer require pxgamer/getiplayer-php
Usage
This currently creates a single .ts file which can be encoded using Handbrake or another encoder.
Usage
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.
Change log
Please see CHANGELOG for more information on what has changed recently.
Testing
$ composer test
Contributing
Please see CONTRIBUTING and CODE_OF_CONDUCT for details.
Security
If you discover any security related issues, please email owzie123@gmail.com instead of using the issue tracker.
Credits
License
The MIT License (MIT). Please see License File for more information.