Initial commit
Some checks failed
定时更新GitHub源插件 / 自动更新GitHub插件 (push) Has been cancelled

This commit is contained in:
chorblack
2026-03-07 11:19:25 +08:00
commit e75f275ef4
4484 changed files with 645480 additions and 0 deletions

17
MyPlayer/api/iqiyi.php Normal file
View File

@@ -0,0 +1,17 @@
<?php
/*
* 爱奇艺
*/
class iqiyi extends API{
protected function LoadRemote( ) {
if( TryGetParam( 'id', $id ) ) {
$html = GetUrlContent( "http://www.iqiyi.com/v_{$id}.html" );
$count = preg_match_all( '/\"vid\":\"([0-9a-z]+)\"/s', $html, $matchs );
if( $count ){
$vid = $matchs[1][0];
$this->data = array( );
$this->data['url'] = "http://player.video.qiyi.com/{$vid}/0/0/v_{$id}.swf";
}
}
}
}

31
MyPlayer/api/lyric.php Normal file
View File

@@ -0,0 +1,31 @@
<?php
/*
* 歌词文件
*/
class lyric extends API{
protected function LoadRemote( ) {
if( TryGetParam( 'url', $url ) ) {
$source = GetUrlContent( $url );
$this->data['source'] = $source;
//$this->data['json'] = $this->GetJson($source);
}
}
function GetJson($lyric){
$lrc = array();
$preg = '/^(.*?)$/m';
$count = preg_match_all( $preg, $lyric, $match );
foreach( $match[1] as $line ) {
$preg = '/\[(\d{2}:.*?)\]/s';
preg_match_all( $preg, $line, $m );
$text = implode( '', $m[0] );
$text = str_replace( $text, '' ,$line );
foreach( $m[1] as $t ) {
$i = explode( ':', $t );
$time = $i[0] * 60 + $i[1];
$lrc[] = array( $time, $text );
}
}
sort( $lrc );
return $lrc;
}
}

18
MyPlayer/api/sina.php Normal file
View File

@@ -0,0 +1,18 @@
<?php
/*
* 新浪视频
*/
class sina extends API{
protected function LoadRemote( ) {
if( TryGetParam( 'url', $url ) ) {
$url = $url;
$html = GetUrlContent( "http://dp.sina.cn/dpool/video/pad/play.php?url={$url}" );
$count = preg_match_all( '/$SCOPE\[\'vid\'\]\s=\s"(\d+)";/s', $html, $matchs );
if( $count ){
$this->data = array( );
$this->data['url'] = $matchs[1][0];
$this->data['url'] = 'http://you.video.sina.com.cn/api/sinawebApi/outplayrefer.php/vid={$matchs[1][0]}/s.swf'
}
}
}
}