0
Good guys, I’m kind of Noob in this php subject, I’m developing a dynamic site that videos are on another server so I’m using the API of this site, I have problems when I’m performing a call from JSON already decoded to make a loop of an iframe, it does not impress me any result, I leave the code for you to observe, thank you very much
<?php
$ch = curl_init();
$apiToken = 'zAt7UIgedZtnicMwvKRV1gz39vYlBKEshHQRpOVWahQn4dRyEhLFTF5qJ6ad';
curl_setopt($ch, CURLOPT_URL, "https://api.vidoza.net/v1/files");
$authorization = "Authorization: Bearer ".$apiToken;
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: application/json' , $authorization ));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$res = curl_exec($ch);
$json = json_decode($res["data"], true);
foreach ($json as $key => $value) {
echo '
<IFRAME
SRC="https://vidoza.net/embed-'.$value["id"].'.html"
FRAMEBORDER=0 MARGINWIDTH=0 MARGINHEIGHT=0
SCROLLING=NO WIDTH=640 HEIGHT=360 allowfullscreen>
</IFRAME>
';
}
?>
Thank you Vinicius, that’s right, thank you very much for your time...
– betoml