denis2016 0 Denunciar post Postado Fevereiro 12, 2016 Olá estou trabalhando com esse codigo if (count($my_formats_array) == 0) { echo '<p>No format stream map found - was the video id correct?</p>'; exit; } /* create an array of available download formats */ $avail_formats[] = ''; $i = 0; $ipbits = $ip = $itag = $sig = $quality = ''; $expire = time(); foreach($my_formats_array as $format) { parse_str($format); $avail_formats[$i]['itag'] = $itag; $avail_formats[$i]['quality'] = $quality; $type = explode(';',$type); $avail_formats[$i]['type'] = $type[0]; $avail_formats[$i]['url'] = urldecode($url) . '&signature=' . $sig; parse_str(urldecode($url)); $avail_formats[$i]['expires'] = date("G:i:s T", $expire); $avail_formats[$i]['ipbits'] = $ipbits; $avail_formats[$i]['ip'] = $ip; $i++; } if ($debug) { echo '<p>These links will expire at '. $avail_formats[0]['expires'] .'</p>'; echo '<p>The server was at IP address '. $avail_formats[0]['ip'] .' which is an '. $avail_formats[0]['ipbits'] .' bit IP address. '; echo 'Note that when 8 bit IP addresses are used, the download links may fail.</p>'; } if ($my_type == 'Baixar') { / * listagem dos link * / /* now that we have the array, print the options */ for ($i = 0; $i < count($avail_formats); $i++) { if($config['VideoLinkMode']=='direct'||$config['VideoLinkMode']=='both') echo '<style="color:#FFFFFF" a href="' . $avail_formats[$i]['url'] . '&title='.$cleanedtitle.' ">' . $avail_formats[$i]['type'] . '</a> '; else echo '<span class="mime">' . $avail_formats[$i]['type'] . '</span> '; echo '- Qualidade: <font color="#FF0000">' . $avail_formats[$i]['quality']; if($config['VideoLinkMode']=='proxy'||$config['VideoLinkMode']=='both') echo '</font> '; echo '<a target="_blank" href="' . $avail_formats[$i]['url'] . '&title='.$cleanedtitle.'" style="color:#3CB371" class="mime">- Baixar</a> '; echo '<br>'; } ?> Ele me retorna uma lista com tipos diferentes de link's para download Exemplo: video/mp4 - Qualidade: hd720 - Baixar video/webm - Qualidade: medium - Baixar video/mp4 - Qualidade: medium - Baixar video/x-flv - Qualidade: small - Baixar video/3gpp - Qualidade: small - Baixar video/3gpp - Qualidade: small - Baixar Como faço para identifica-los para lista-los de outra maneira? Compartilhar este post Link para o post Compartilhar em outros sites