#YouTube dan video/audio yuklovchi API
function download($url, $quality, $option) {
$api = "
https://x.wwi.su/x/download/";
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => $api."?option=download&url=$url&quality=$quality",
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 download($_GET["url"], $_GET["quality"], $_GET["option"]);
Batafsil:
https://x.wwi.su/blog/youtube-dan-yuklab-oluvchi-kod!/
#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:
#YouTube dan so'z bo'yicha video/musiqa qidiruvchi api
function search($query) {
$api = "a href='https://x.wwi.su/x/recognize/' rel='nofollow'https://x.wwi.su/x/recognize//a";
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => $api."?url=$query",
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["query"]);
Batafsil:
https://x.wwi.su/blog/youtube-dan-video-qidiruvchi-api!/
@KingsOfPhp