Skip to content

Commit

Permalink
优化播放页标题
Browse files Browse the repository at this point in the history
播放页标题显示当前观看视频 级数名称
  • Loading branch information
unkaer committed Jun 21, 2020
1 parent d97dda1 commit 2d10cb2
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 3 deletions.
4 changes: 3 additions & 1 deletion cx.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@ function playdetail($detailurl)
preg_match_all("/([^>]+)[$](https?.*\/index.m3u8)/",$html,$playurl); // 播放地址
for($i=0;$i<sizeof($playurl[2]);$i++){
print_r("<form action=\"./play.php\" method='POST'>");
print_r("<input type=\"hidden\" name=\"url\" value=".$playurl[2][$i]."><p><input type=\"submit\" value=\"播放·".$playurl[1][$i]."·".$title[1][0]."\"></p></form>");
print_r("<input type=\"hidden\" name=\"url\" value=".$playurl[2][$i].">");
print_r("<input type=\"hidden\" name=\"name\" value=".$playurl[1][$i]."·".$title[1][0].">");
print_r("<p><input type=\"submit\" value=\"播放·".$playurl[1][$i]."·".$title[1][0]."\"></p></form>");
}

}
Expand Down
8 changes: 7 additions & 1 deletion play.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,13 @@
<html lang="zh-cmn-Hans">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" >
<title>DPlayer视频播放页</title>
<title><?php
if(array_key_exists("name", $_POST)){
echo $_POST['name'];
}else{
echo "DPlayer视频播放页";
}
?></title>
<link rel="stylesheet" href="./DPlayer.min.css">
<script type="text/javascript" src="./dplayer/hls.min.js" ></script>
<script type="text/javascript" src="./dplayer/DPlayer.min.js" ></script>
Expand Down
3 changes: 2 additions & 1 deletion ss.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ function geturl($id,$api){
$title=(string)$video->name;
for($i=0;$i<sizeof($playurl[0]);$i++){
print_r("<form action=\"./play.php\" method='POST'>");
print_r("<input type=\"hidden\" name=\"url\" value=\"".$playurl[0][$i]."\">");
print_r("<input type=\"hidden\" name=\"url\" value=".$playurl[0][$i].">");
print_r("<input type=\"hidden\" name=\"name\" value=".$tag[1][$i]."·".$title.">");
print_r("<input type=\"submit\" value=播放·".$tag[1][$i]."·".$title."></form>");
}
}
Expand Down

0 comments on commit 2d10cb2

Please sign in to comment.