PHP Classes

PHP Musixmatch: Get details about music using the Musixmatch API

Recommend this page to a friend!
     
  Info   Example   View files Files   Install with Composer Install with Composer   Download Download   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
Not yet rated by the usersTotal: 41 All time: 10,888 This week: 56Up
Version License PHP version Categories
musixmatch 1.0MIT/X Consortium ...5PHP 5, Web services, Audio
Description 

Author

This package can get details about music using the Musixmatch API.

It can send HTTP requests to the Web server of the Musixmatch API to perform operations related to music and artists.

The package comes with an example to retrieve the top music artists of a country and searching for artists of a given country.

Picture of Mateo
  Performance   Level  
Name: Mateo <contact>
Classes: 23 packages by
Country: Peru Peru
Age: ???
All time rank: 20394 in Peru Peru
Week rank: 131 Up1 in Peru Peru Up
Innovation award
Innovation award
Nominee: 10x

Winner: 3x

Example

<?php require __DIR__ . '/../vendor/autoload.php';

use
Musixmatch\Musixmatch;

// Load api key from .env file
Musixmatch::SetApiKeyEnv(__DIR__); // or Musixmatch::SetApiKey('YOUR API KEY HERE');

/**
 * Basic example
 *
 * Musixmatch::Send('method_name', ['parameters']);
 */


// Get the list of the top artists of a given country.
$response = Musixmatch::Send('chart.artists.get', [
 
'country' => 'it',
 
'page' => 1,
 
'page_size' => 2
]); // Return string
print_r($response);


// Search for track in our database.
// See more in https://developer.musixmatch.com/documentation/api-reference/track-search
$response = Musixmatch::Send('track.search', [
 
'q_track' => '', // The song title
 
'q_artist' => 'justin bieber', // The song artist
 
'page' => 1, // Define the page number for paginated results
 
'page_size' => 2 // Define the page size for paginated results. Range is 1 to 100.
], true); // Return array
print_r($response);


Details

MusixMatch API

See examples in the examples folder

Get your api key in MusixMatch

Installation

git clone https://github.com/Mateodioev/musixmatch.git
composer install

  Files folder image Files (6)  
File Role Description
Files folder imageexamples (2 files)
Files folder imagesrc (2 files)
Accessible without login Plain text file composer.json Data Auxiliary data
Accessible without login Plain text file README.md Doc. Documentation

  Files folder image Files (6)  /  examples  
File Role Description
  Accessible without login Plain text file .env Data Auxiliary data
  Accessible without login Plain text file Musix.php Example Example script

  Files folder image Files (6)  /  src  
File Role Description
  Plain text file Musixmatch.php Class Class source
  Plain text file MusixmatchRequest.php Class Class source

The PHP Classes site has supported package installation using the Composer tool since 2013, as you may verify by reading this instructions page.
Install with Composer Install with Composer
 Version Control Unique User Downloads Download Rankings  
 100%
Total:41
This week:0
All time:10,888
This week:56Up