0
我已經連接到tumblr與php,我有視頻代碼,但是當視頻是mp4並插入沒有重疊播放按鈕。我注意到,如果我採用獨特的視頻參考,並將其傳遞給iframe,它可以工作。tumblr:從視頻html字符串中檢索視頻ID
以下是從tumblr返回。我怎樣才能在輸出中得到數字'123988138584',這樣我就可以以不同的方式使用?我需要在一個循環中做到這一點,所以我不能搜索這個數字,我想我需要抓住源碼中第5個和第6個之間的數字。
<video id="embed-59724c3fde66d663835959" class="crt-video crt-skin-default" width="250" height="141" poster="https://31.media.tumblr.com/tumblr_nrfpgvIFCb1twbtyc_frame1.jpg" preload="none" muted="" data-crt-video="" data-crt-options="{"autoheight":null,"duration":17,"hdUrl":"https:\/\/clarestrand.tumblr.com\/video_file\/t:8tTSaNxZkkAOPCxNMgJHPw\/123988138584\/tumblr_nrfpgvIFCb1twbtyc\/720","filmstrip":{"url":"https:\/\/33.media.tumblr.com\/previews\/tumblr_nrfpgvIFCb1twbtyc_filmstrip.jpg","width":"200","height":"112"}}" controls="controls">
<source src="https://clarestrand.tumblr.com/video_file/t:8tTSaNxZkkAOPCxNMgJHPw/123988138584/tumblr_nrfpgvIFCb1twbtyc/480" type="video/mp4">
</video>
我接受其他的想法。我需要在視頻上播放按鈕。
感謝
http://php.net/preg_match,http://php.net/domdocument,或(可能)是兩者的結合。 – ceejayoz