BlastFM Limited Music Art API            
A valid API key is required for lookups to work, any access attempts which are not accompanied by an API key will fail
API Parameters
• artist - api lookup for an artist name
• track - api lookup for a track name
• api - Your API key
• domain - The domain from which you are accessing the API (optional)
Example API lookup
$data = "https://api.blastfmmusicart.com/api.php?".http_build_query(array("artist" => $searchArtist, "track" => $searchTrack, "api" => $yourApiKey));
<img src="<?php echo file_get_contents($data); ?>" alt="someThing" />

All database queries should be fully url encoded, they will be decoded by the API

Assuming that $searchArtist contains the name of an artist and/or $searchTrack contains the name of a music track and $yourApiKey contains a valid API key, a result can be fetched.
Optionally, a domain parameter can also be sent which contains the domain name of the host making the API call.

The API returns one of three things, (A) The URL of the image media (B) A NULL value if no image was found (C) an error message describing certain conditions, for example, a missing API key

Additionally, it is not a good idea to check the return data for empty, example: if (!empty($data)) {} because if an error message is returned, it is not empty, but it is not an image URL either.
The best way to check the return data, in PHP anyway, is to use a regular expression to check if the return data is a link to an image file. Example: if (preg_match("/^http.*[\.jpg|\.jpg|\.jpeg|\.png]$/i", $returnData)) {/*I got an image!*/}

BlastFM Logo

The API is fully hand coded by © BlastFM Limited 2019
Visit our Artwork Gallery at https://blastfmmusicart.com/gallery
More API information is available at: https://blastfmmusicart.com/page/blastfm-limited-music-art-api-support

Version 1.7.8