PHP code example of baiy / video_parse
1. Go to this page and download the library: Download baiy/video_parse library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
baiy / video_parse example snippets
$video = new \VideoParse\Site\www56com\video();
$video->setUrl('http://www.56.com/w87/play_album-aid-14296502_vid-MTQxMDAxODE3.html');
echo "\n--- 播放地址 ---\n";
print_r($video->getPlayUrl());
echo "\n--- 下载地址 ---\n";
print_r($video->getDownloadUrl());
// 优酷
$video = new \VideoParse\Site\youku\video();
$video->setUrl('http://v.youku.com/v_show/id_XMTUzOTM5MjAxNg==.html');
echo "\n--- 播放地址 ---\n";
print_r($video->getPlayUrl());