Radio World – 75,000+ Worldwide FM Radio stations

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => “https://radio-world-75-000-worldwide-fm-radio-stations.p.rapidapi.com/search_radio.php?keyword=hello&limit=10&page=1&order=ASC”,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_ENCODING => “”,
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => “GET”,
CURLOPT_HTTPHEADER => [
“X-RapidAPI-Host: radio-world-75-000-worldwide-fm-radio-stations.p.rapidapi.com”,
“X-RapidAPI-Key: f49ee805fbmsh62e9878bf7a1b8dp1984a0jsnf9fa5fe12e9f”
],
]);

$response = curl_exec($curl);
$json = json_decode($response, true);
$fmspots = $json[‘stations’];
$err = curl_error($curl);
curl_close($curl);

if ($err) {
echo “cURL Error #:” . $err;
}
else {
foreach($fmspots as $fmspot)
{
$radio_name = $fmspot[‘radio_name’];
$radio_image = $fmspot[‘radio_image’];
$radio_url = $fmspot[‘radio_url’];
$genre = $fmspot[‘genre’];
$country_name = $fmspot[‘country_name’];
$country_flag = $fmspot[‘country_flag’];
echo ‘


‘.’

‘.$radio_name.’

‘;

echo ‘‘.’ ‘.’

‘.$country_name.’

‘;

echo ‘‘.’‘.’‘;
echo ‘‘.’ Radio Link: ‘.’‘.’‘.$radio_url.’‘.’
‘;
echo ‘‘.’ Genre/Language: ‘.$genre.’‘.’
‘;
}
}