1. Go to this page and download the library: Download snapshotpl/last-fm-client 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/ */
snapshotpl / last-fm-client example snippets
= new LastFmClient\Auth();
$auth->setApiKey('your-api-key');
$auth->setSecret('your-secret');
$auth->setToken('user-token');
$auth->setSession('user-session');
$transport = new LastFmClient\Transport\Curl();
$client = new LastFmClient\Client($auth, $transport);
$trackService = new LastFmClient\Service\Track();
$trackService->setClient($client);
$response = $trackService->getInfo('Numb', 'Linkin Park');
var_dump($response->getData());