PHP Classes

PHP Musixmatch: Get details about music using the Musixmatch API

Recommend this page to a friend!
  Info   View files Example   View files View files (6)   DownloadInstall with Composer Download .zip   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
Not yet rated by the usersTotal: 39 All time: 10,823 This week: 124Up
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: 20 packages by
Country: Peru Peru
Age: ???
All time rank: 21264 in Peru Peru
Week rank: 7 Up1 in Peru Peru Up
Innovation award
Innovation award
Nominee: 8x

Winner: 1x

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  
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  /  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  /  src  
File Role Description
  Plain text file Musixmatch.php Class Class source
  Plain text file MusixmatchRequest.php Class Class source

 Version Control Unique User Downloads Download Rankings  
 100%
Total:39
This week:0
All time:10,823
This week:124Up