jamband / ripple
Get a track/album information from the URL.
Installs: 3 632
Dependents: 0
Suggesters: 0
Security: 0
Stars: 10
Watchers: 3
Forks: 1
Open Issues: 0
pkg:composer/jamband/ripple
Requires
- php: ^8.2
Requires (Dev)
- friendsofphp/php-cs-fixer: ^3.91
- phpstan/phpstan: ^2.1
- phpunit/phpunit: ^11.5
- dev-main
- v0.18.0
- v0.17.0
- v0.16.1
- v0.16.0
- v0.15.0
- v0.14.0
- v0.13.1
- v0.13.0
- v0.12.0
- v0.11.0
- v0.10.3
- v0.10.2
- v0.10.1
- v0.10.0
- v0.9.0
- v0.8.0
- v0.7.0
- v0.6.0
- v0.5.1
- v0.5.0
- v0.4.5
- v0.4.4
- v0.4.3
- v0.4.2
- v0.4.1
- v0.4.0
- v0.3.2
- v0.3.1
- v0.3.0
- v0.2.0
- v0.1.9
- v0.1.8
- v0.1.7
- v0.1.6
- v0.1.5
- v0.1.4
- v0.1.3
- v0.1.2
- v0.1.1
- v0.1.0
This package is auto-updated.
Last update: 2025-12-05 06:30:54 UTC
README
Get a track/album information from the URL.
Requirements
PHP 8.2 or later
Installation
composer require jamband/ripple
Usage
// basic $ripple = new Jamband\Ripple\Ripple(); $ripple->request('https://example.bandcamp.com/track/title'); $ripple->provider(); // Bandcamp $ripple->url(); // https://example.bandcamp.com/track/title $ripple->id(); // 123 $ripple->title(); // Title, by Artist $ripple->image(); // https://img.example.com/img/123.jpg
// embed $ripple = new Jamband\Ripple\Ripple(); $ripple->options(['embed' => ['Bandcamp' => 'size=large/']]); $ripple->request('https://example.bandcamp.com/track/title'); $embed = $ripple->embed(); // https://bandcamp.com/EmbeddedPlayer/track=123/size=large/ ?> <iframe width="300" height="300" src="<?= $embed ?>" allow="fullscreen"></iframe>
// custom curl options $ripple = new Jamband\Ripple\Ripple(); $ripple->options(['curl' => [ // CURLOPT_TIMEOUT => 8, // CURLOPT_USERAGENT => '...', // ... ]]); $ripple->request('https://example.bandcamp.com/track/title');
// mock response $ripple = new Jamband\Ripple\Ripple(); $ripple->options(['response' => '...']); $ripple->request('https://example.bandcamp.com/track/title');
Valid URLs
Bandcamp:
https://{subdomain}.bandcamp.com/track/{title}
https://{subdomain}.bandcamp.com/album/{title}
https://{subdomain}.bandcamp.com/releases
https?://{domain}/track/{title}
https?://{domain}/album/{title}
https?://{domain}/releases
SoundCloud:
https://soundcloud.com/{account}/{title}
https://soundcloud.com/{account}/sets/{title}
Vimeo:
https://vimeo.com/{id}
YouTube:
https://www.youtube.com/watch?v={id}
https://www.youtube.com/playlist?list={id}
https://youtu.be/{id}
Supported Providers
- Bandcamp
- SoundCloud
- Vimeo
- YouTube
License
Ripple is licensed under the MIT license.