1
我正在嘗試使用數組中的itag值查找url值。 我想找到itag值爲18(itag = 18)的數組中的url值。按鍵值在數組中搜索多維[PHP]
PHP代碼:
<?php
$videoId = "EJOnwF8mgXc";
parse_str(file_get_contents("http://youtube.com/get_video_info?video_id=" .
$videoId), $info);
$streams = $info['url_encoded_fmt_stream_map'];
$streams = explode(',', $streams);
foreach ($streams as $stream) {
parse_str($stream, $data);
print_r($data);
}
這裏包括相關代碼,請,而不是在GitHub上要旨。另外,請說明你所嘗試過的 - 這個問題有很多現有的解決方案,所以這不是新的。 –
我無法添加輸出文本,因爲它包含很多鏈接(不允許通過stackoverflow)。 @cale_b –
你想找什麼? –