Scriptimde tek api kullanılıyor şu şekilde kodlar:
Alıntı
Şu yöntemi denedim ama işe yaramadı
Alıntı
Alıntı
6
●165
$search_results = file_get_contents("https://www.googleapis.com/youtube/v3/search?part=snippet&q=$keywords&type=video&key=" . $apikeys[0] ."&maxResults=21");
$search_results = file_get_contents("https://www.googleapis.com/youtube/v3/search?part=snippet&q=$keywords&type=video&key=". $apikeys[1] ."&maxResults=21");yada döngünü içindeforeach ($apikeys as $apikey) {
$search_results = file_get_contents("https://www.googleapis.com/youtube/v3/search?part=snippet&q=$keywords&type=video&key=$apikey&maxResults=21");
} 
$key = $apikeys[rand(0,1)]; // buradaki 1 sayısı toplam key sayınız - 1 olmalı yani 8 key varsa $key = $apikeys[rand(0,7)]; gibi
$search_results = file_get_contents("https://www.googleapis.com/youtube/v3/search?part=snippet&q=$keywords&type=video&key=$key&maxResults=21"); $ApiKeys = array("dsasaSADd00", "sadds4DFDf", "sdafdd5DDff");
$search_results = file_get_contents("https://www.googleapis.com/youtube/v3/search?part=snippet&q=$keywords&type=video&key={$ApiKeys[array_rand($ApiKeys)]}&maxResults=21");