#Shazam API
Notanish musiqani ma'lumotlarini qidirish uchun API:
function recognize($url) {
$api = "https://x.wwi.su/x/recognize/";
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => $api."?url=$url",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_USERAGENT => "PHPiB",
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
curl_close($curl);
return $response;
}
header('Content-Type: application/json');
echo recognize($_GET["url"]);
Batafsil:
Notanish musiqani ma'lumotlarini qidirish uchun API:
function recognize($url) {
$api = "https://x.wwi.su/x/recognize/";
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => $api."?url=$url",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_USERAGENT => "PHPiB",
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
curl_close($curl);
return $response;
}
header('Content-Type: application/json');
echo recognize($_GET["url"]);
Batafsil: