1. Go to this page and download the library: Download duck7000/musicbrainz-php 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/ */
duck7000 / musicbrainz-php example snippets
$music = new \Music\TitleSearch();
$results = $music->search("", "", "724383065820", "", "", ""); // example with barcode (title and artist are ignored)
$results = $music->search("", "", "", "ys9FSMFAFYjQIkkVXrd3iIs6s.o-", "", ""); // example with discid only
$results = $music->search("who made who", "AC/DC", "", "", "", ""); // example with CD title and artist
$results = $music->search("who made who", "", "", "", "", ""); // example with CD title only
$results = $music->search("", "AC/DC", "", "", "", ""); // example with artist only
$results = $music->search("", "", "", "", "12345-2", ""); // example with CD catalog number only
$results = $music->search("who made who", "", "", "", "", "Vinyl"); // example with format override
$music = new \Music\Title("095e2e2e-60c4-4f9f-a14a-2cc1b468bf66"); // parameter is the found musicBrainz id from search)
$results = $music->fetchData(); // This returns a array with all available info of this title
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.