PHP code example of matto1990 / lastfm-api

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

    

matto1990 / lastfm-api example snippets


use LastFmApi\Api\AuthApi;
use LastFmApi\Api\ArtistApi;

class LastFm
{
    private $apiKey;
    private $artistApi;

    public function __construct()
    {
        $this->apiKey = 'apikeyfromlastfm'; //Api->getInfo(array("artist" => $artist));

        return $artistInfo['bio'];
    }	
}