change security video address

master
hhCandy 5 years ago
parent 663db5ba6f
commit 50f0db1d98
  1. 2
      etc/dplayer/setup.js
  2. 2
      etc/dplayer/setup_once.js
  3. 1
      video/landin.html
  4. 37
      video/video_address.php

@ -96,7 +96,7 @@ function newVideo(id,next,seek)
if(!seek){seek=cookie.get('vTime_'+g_vId)}
newVideo_detail(msg.id,msg.url1,next,seek,msg.aid);
newVideo_detail(msg.id,'https://cn.yimian.xyz/video/video_address.php?fp='+fp+'&id='+msg.id,next,seek,msg.aid);
cookie.set('vWatching',g_vId);
//record video for usr
timeUpdate_count=0;

@ -102,7 +102,7 @@ $.ajax({
volume: 0.7,
mutex: true,
video: {
url: g_vUrl1
url: 'https://cn.yimian.xyz/video/video_address.php?fp='+fp+'&id='+g_vId
},
danmaku: {
id: g_vId,

@ -0,0 +1 @@
<html></html>

@ -0,0 +1,37 @@
<?php
include '../functions.php';
$id=$_REQUEST['id'];
$fp=$_REQUEST['fp'];
if(!isset($fp)||$fp=="") die();
$conn=db__connect();
$usr=db__getData($conn,"fp","fp",$fp);
if($usr[0]['usr']=="")
{
$res=db__getData($conn,"videolog","fp",$fp);
$cnt=0;
foreach($res as $each)
{
if($each['time']>(time()-3600*24)) $cnt++;
}
if($cnt>20)
{
echo json_encode(array("code"=>2));
die();
}
}
$video=db__getData($conn,"video","id",$id);
header("Location: ".$video[0]['url1']);
Loading…
Cancel
Save