diff --git a/server/cn/home/www/api/video/video_fp.php b/server/cn/home/www/api/video/video_fp.php index 52c197c..bd48e13 100644 --- a/server/cn/home/www/api/video/video_fp.php +++ b/server/cn/home/www/api/video/video_fp.php @@ -17,7 +17,7 @@ else db__pushData($conn,"fp",array("fp"=>$fp,"videoseek"=>$seek,"video"=>$id,"ip"=>$ip,"videotime"=>time()),array("fp"=>$fp)); -db__pushData($conn,"videolog",array("ip"=>$ip,"fp"=>$fp,"seek"=>$seek,"video"=>$id,"time"=>time()),array("fp"=>$fp,"video"=>$id)); +yimian__log("log_video",array("ip"=>ip2long($ip),"fp"=>$fp,"seek"=>$seek,"vid"=>$id,"timestamp"=>date('Y-m-d H:i:s', time())),array("fp"=>$fp,"vid"=>$id)); header('Content-type: text/json'); diff --git a/server/cn/home/www/functions.php b/server/cn/home/www/functions.php index d7f3ed0..2a91754 100644 --- a/server/cn/home/www/functions.php +++ b/server/cn/home/www/functions.php @@ -366,9 +366,9 @@ function db__antisql($str) /*****log******/ -function yimian__log($table, $val){ +function yimian__log($table, $val, $limit){ - db__pushData(db__connect("log"), $table, $val); + db__pushData(db__connect("log"), $table, $val, $limit); } @@ -412,7 +412,7 @@ function get_from(){ } function get_from_domain(){ - + $str = str_replace("http://","",get_from()); $str = str_replace("https://","",get_from()); $strdomain = explode("/",$str);