parent
746dc27488
commit
d34df75494
15 changed files with 106 additions and 19 deletions
@ -0,0 +1,2 @@ |
||||
<h2>Welcome to Yimian API</h2> |
||||
<p><a href="https://iotcat.me">Go to IoTcat's Home Page</a></p> |
@ -0,0 +1,45 @@ |
||||
<?php |
||||
include '../../functions.php'; |
||||
|
||||
header('Access-Control-Allow-Origin:*'); |
||||
|
||||
$id=$_REQUEST['id']; |
||||
$fp=$_REQUEST['fp']; |
||||
|
||||
|
||||
if(isset($_SESSION['s_fp'])) |
||||
{ |
||||
if($_SESSION['s_fp']!=$fp) {header("Location: https://yimian-video.obs.myhwclouds.com/404.mp4");die();} |
||||
} |
||||
|
||||
|
||||
if(!isset($fp)||$fp=="") {header("Location: https://yimian-video.obs.myhwclouds.com/404.mp4");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']); |
@ -1,2 +0,0 @@ |
||||
config.php |
||||
old_version |
@ -1,3 +0,0 @@ |
||||
# YimianVideo |
||||
Video System power for Yimian Web |
||||
## Deverloped from Dplayer |
Loading…
Reference in new issue