PHP code example of pbxg33k / musicbrainz

1. Go to this page and download the library: Download pbxg33k/musicbrainz 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/ */

    

pbxg33k / musicbrainz example snippets



    use Guzzle\Http\Client;
    use MusicBrainz\Filters\ArtistFilter;
    use MusicBrainz\Filters\RecordingFilter;
    use MusicBrainz\HttpAdapters\GuzzleFiveAdapter;
    use MusicBrainz\MusicBrainz;

    > "Buddy Holly",
        "artist"     => 'Weezer',
        "creditname" => 'Weezer',
        "status"     => 'Official'
    );
    try {
        $recordings = $brainz->search(new RecordingFilter($args));
        print_r($recordings);
    } catch (Exception $e) {
        print $e->getMessage();
    }


    use Guzzle\Http\Client;
    use MusicBrainz\Filters\ArtistFilter;
    use MusicBrainz\Filters\RecordingFilter;
    use MusicBrainz\HttpAdapters\GuzzleHttpAdapter;
    use MusicBrainz\MusicBrainz;

    > "Buddy Holly",
        "artist"     => 'Weezer',
        "creditname" => 'Weezer',
        "status"     => 'Official'
    );
    try {
        $recordings = $brainz->search(new RecordingFilter($args));
        print_r($recordings);
    } catch (Exception $e) {
        print $e->getMessage();
    }