auto update

old
iotcat 4 years ago
parent 9d7ea3951e
commit 59366815bc
  1. 43
      ushio/conf/nginx/danmaku.yimian.xyz.conf
  2. 193
      yimian/.viminfo
  3. 2
      yimian/www/acg.watch/.gitignore
  4. 527
      yimian/www/acg.watch/functions.php
  5. 22
      yimian/www/acg.watch/index.php
  6. 12
      yimian/www/nextcloud/data/nextcloud.log
  7. 2
      yimian/www/shorturl/.gitignore

@ -0,0 +1,43 @@
server {
listen 80;
#listen [::]:80;
server_name danmaku.yimian.xyz;
rewrite ^(.*)$ https://$host$1 permanent;
}
server {
# listen 80;
# listen [::]:80;
listen 443 ssl;
server_name danmaku.yimian.xyz;
ssl_certificate /home/yimian/ssl/star.yimian.xyz.ssl/star.yimian.xyz.crt; #2
ssl_certificate_key /home/yimian/ssl/star.yimian.xyz.ssl/star.yimian.xyz.key; #3
ssl_session_cache shared:SSL:1m;
ssl_session_timeout 5m;
ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:ECDHE:ECDH:AES:HIGH:!NULL:!aNULL:!MD5:!ADH:!RC4;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_prefer_server_ciphers on;
# error_page 404 = /404.php;
# Load configuration files for the default server block.
location / {
proxy_pass http://127.0.0.1:1207;
proxy_connect_timeout 300s;
proxy_send_timeout 300s;
proxy_read_timeout 300s;
}
error_page 404 /404.html;
location = /40x.html {
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
}
}

@ -14,10 +14,10 @@
$
# Command Line History (newest to oldest):
:wq
:q!
:q
:w
:wq
:q!
:Wq
:Q!
:q1
@ -46,11 +46,10 @@ $
332
< <div class="pay-button" role="presentation" class="active"><button href="#alipay_author" id="alipay-tab" aria-controls="alipay_author" role="tab" data-toggle="tab" class="btn m-b-xs btn-info"><i class="iconfont icon-alipay" aria-hidden="true"></i><span>&nbsp;'._mt("支付宝").'</span></button>
""1 LINE 0
hi ACG.WATCHls
"2 LINE 0
283
< <button href="#wechatpay_author" id="wechatpay-tab" aria-controls="wechatpay_author" role="tab" data-toggle="tab" class="btn m-b-xs btn-success"><i class="iconfont icon-wechatpay" aria-hidden="true"></i><span>&nbsp;'._mt("微信").'</span></button>
"2 LINE 0
328
< <div class="pay-button" role="presentation"><button href="#wechatpay_author" id="wechatpay-tab" aria-controls="wechatpay_author" role="tab" data-toggle="tab" class="btn m-b-xs btn-success"><i class="iconfont icon-wechatpay" aria-hidden="true"></i><span>&nbsp;'._mt("微信").'</span></button>
"3 LINE 0
328
< <div class="pay-button" role="presentation"><button href="#wechatpay_author" id="wechatpay-tab" aria-controls="wechatpay_author" role="tab" data-toggle="tab" class="btn m-b-xs btn-success"><i class="iconfont icon-wechatpay" aria-hidden="true"></i><span>&nbsp;'._mt("微信").'</span></button>
@ -58,13 +57,16 @@ $
328
< <div class="pay-button" role="presentation"><button href="#wechatpay_author" id="wechatpay-tab" aria-controls="wechatpay_author" role="tab" data-toggle="tab" class="btn m-b-xs btn-success"><i class="iconfont icon-wechatpay" aria-hidden="true"></i><span>&nbsp;'._mt("微信").'</span></button>
"5 LINE 0
328
< <div class="pay-button" role="presentation"><button href="#wechatpay_author" id="wechatpay-tab" aria-controls="wechatpay_author" role="tab" data-toggle="tab" class="btn m-b-xs btn-success"><i class="iconfont icon-wechatpay" aria-hidden="true"></i><span>&nbsp;'._mt("微信").'</span></button>
"6 LINE 0
332
< <div class="pay-button" role="presentation" class="active"><button href="#alipay_author" id="alipay-tab" aria-controls="alipay_author" role="tab" data-toggle="tab" class="btn m-b-xs btn-info"><i class="iconfont icon-alipay" aria-hidden="true"></i><span>&nbsp;'._mt("支付宝").'</span></button>
"6 LINE 0
</div>
"7 LINE 0
</div>
"8 CHAR 0
"8 LINE 0
</div>
"9 CHAR 0
function getMatchedKeys($str, $arr){
if(!is_array($str)){
@ -81,73 +83,30 @@ $
return $o;
}
}
"9 CHAR 0
elseif($type){
$arr = getImgsInfo($type);
if($id){
$pos = array_search($id, $arr[1]);
if($pos) $path = $type. '/' .$arr[0][$pos];
}
if(!$size && !$path){
$path = $type. '/' .$arr[0][array_rand($arr[0])];
}elseif(strpos($size, '-') && !$path){
$arr_size = explode('x',$size);
if(strpos($arr_size[0], '-')) $arr_size_length = explode('-',$arr_size[0]);
else $arr_size_length = $arr_size[0];
if(strpos($arr_size[1], '-')) $arr_size_high = explode('-',$arr_size[1]);
else $arr_size_high = $arr_size[1];
$arr_length = getMatchedKeys($arr_size_length, $arr[2]);
$arr_high = getMatchedKeys($arr_size_high, $arr[3]);
if($arr_size[0] == '*') $arr_keys = $arr_high;
elseif($arr_size[1] == '*') $arr_keys = $arr_length;
else $arr_keys = array_intersect($arr_length, $arr_high);
if(!count($arr_keys)){
header('content-type: application/json');
echo json_encode(array("err"=>"Can not find any images matching Size $size in Type $type!!"));
die();
}
do{
$index = array_rand($arr_keys);
}while($R18 != true && $arr[6][$arr_keys[$index]] != "normal");
$path = $type. '/' .$arr[0][$arr_keys[$index]];
}elseif(!$path){
$arr_size = explode('x',$size);
$arr_length = getMatchedKeys($arr_size[0], $arr[2]);
$arr_high = getMatchedKeys($arr_size[1], $arr[3]);
if($arr_size[0] == '*' && $arr_size[1] == '*') $arr_keys = getMatchedKeys(array(0=>0,1=>9999), $arr[2]);
elseif($arr_size[0] == '*') $arr_keys = $arr_high;
elseif($arr_size[1] == '*') $arr_keys = $arr_length;
else $arr_keys = array_intersect($arr_length, $arr_high);
if(!count($arr_keys)){
header('content-type: application/json');
echo json_encode(array("err"=>"Can not find any images matching Size $size in Type $type!!"));
die();
}
do{
$index = array_rand($arr_keys);
}while($R18 != true && $arr[6][$arr_keys[$index]] != "normal");
$path = $type. '/' .$arr[0][$arr_keys[$index]];
"- CHAR 0
<
a
# File marks:
'0 2 0 /mnt/onedrive/git/fdc/README.md
'1 2 0 /etc/fuse.conf
'2 17 2 /home/ushio/opt/exrate/index.js
'3 10 0 /home/ushio/opt/exrate/index.js
'4 1 33 /etc/ssl.yimian.xyz/update.js
'5 1 0 /home/ushio/www/auth/vercode/checkCode.php
'6 162 0 ~/www/settlement/api/index.php
'7 1 0 /home/ushio/www/api/functions.php
'8 4 21 /home/ushio/conf/dbKeys/auth.db.key.php
'9 1 0 /home/ushio/conf/dbKeys/log.db.key.php
'0 15 12 ~/www/acg.watch/player/index.html
'1 1 12 ~/www/acg.watch/index.php
'2 5 29 ~/www/acg.watch/.db.key.php
'3 2 34 ~/www/acg.watch/functions.php
'4 27 42 ~/www/acg.watch/player/index.html
'5 2 0 /mnt/onedrive/git/fdc/README.md
'6 2 0 /etc/fuse.conf
'7 17 2 /home/ushio/opt/exrate/index.js
'8 10 0 /home/ushio/opt/exrate/index.js
'9 1 33 /etc/ssl.yimian.xyz/update.js
# Jumplist (newest first):
-' 15 12 ~/www/acg.watch/player/index.html
-' 27 10 ~/www/acg.watch/player/index.html
-' 1 12 ~/www/acg.watch/index.php
-' 5 29 ~/www/acg.watch/.db.key.php
-' 1 0 ~/www/acg.watch/.db.key.php
-' 2 34 ~/www/acg.watch/functions.php
-' 1 0 ~/www/acg.watch/functions.php
-' 1 0 ~/www/acg.watch/player/index.html
-' 2 0 /mnt/onedrive/git/fdc/README.md
-' 1 0 /mnt/onedrive/git/fdc/README.md
-' 2 0 /etc/fuse.conf
@ -238,18 +197,38 @@ $
-' 38 0 /home/ushio/www/img/index.php
-' 1 0 /home/ushio/www/img/in
-' 32 0 /home/ushio/www/api/video/index.php
-' 20 0 /home/ushio/www/api/video/index.php
-' 291 3 /home/ushio/www/api/functions.php
-' 293 0 /home/ushio/www/api/functions.php
-' 29 4 /home/ushio/www/api/video/index.php
-' 31 0 /home/ushio/www/api/video/index.php
-' 298 4 /home/ushio/www/api/functions.php
-' 491 0 /home/ushio/www/api/functions.php
-' 588 0 /home/ushio/www/api/functions.php
-' 2 0 /home/ushio/www/api/functions.php
# History of marks within files (newest to oldest):
> ~/www/acg.watch/player/index.html
" 15 12
^ 27 10
. 27 42
+ 24 7
+ 33 7
+ 26 53
+ 27 42
> ~/www/acg.watch/index.php
" 1 12
^ 1 13
. 1 12
+ 1 12
> ~/www/acg.watch/.db.key.php
" 5 29
^ 5 30
. 5 29
+ 4 23
+ 6 22
+ 5 29
> ~/www/acg.watch/functions.php
" 2 34
^ 2 35
. 2 34
+ 2 34
> /mnt/onedrive/git/fdc/README.md
" 2 0
^ 2 0
@ -331,59 +310,3 @@ $
^ 23 160
. 23 158
+ 23 158
> ~/www/blog/usr/themes/handsome/libs/Content.php
" 473 50
^ 482 41
. 482 40
+ 475 87
+ 478 109
+ 478 0
+ 478 125
+ 481 36
+ 481 185
+ 482 29
+ 488 0
+ 488 219
+ 488 300
+ 489 0
+ 489 217
+ 488 213
+ 489 305
+ 490 0
+ 490 218
+ 490 303
+ 486 309
+ 488 305
+ 488 0
+ 488 0
+ 488 0
+ 488 0
+ 490 0
+ 489 0
+ 488 33
+ 489 32
+ 489 32
+ 490 32
+ 489 0
+ 487 0
+ 488 203
+ 489 207
+ 490 205
+ 489 199
+ 490 208
+ 488 206
+ 479 62
+ 482 40
> ~/www/blog/usr/themes/handsome/libs/Handsome.php
" 1 0
^ 1 0
> ~/www/blog/usr/themes/handsome/functions.php
" 1 0
^ 1 0
> ~/www/blog/usr/themes/handsome/post.php
" 63 3
^ 99 3

@ -0,0 +1,2 @@
.config.php
.db.key.php

@ -0,0 +1,527 @@
<?php
require '/home/yimian/www/acg.watch/.db.key.php';
require '/home/yimian/www/settlement/.config.php';
include '/home/ushio/conf/dbKeys/log.db.key.php';
/**database connection**/
//connect to database
function db__connect($servername="",$username="",$password="",$dbname="")
{//echo $GLOBALS['g_db_serverName'];
/* reset */
if($servername=="") $servername=$GLOBALS['g_db_serverName'];
if($username=="") $username=$GLOBALS['g_db_usrName'];
if($password=="") $password=$GLOBALS['g_db_psswd'];
if($dbname=="") $dbname=$GLOBALS['g_db_dbName'];
if($servername == "log"){
$servername = $GLOBALS['g_db_log_serverName'];
$username = $GLOBALS['g_db_log_usrName'];
$password = $GLOBALS['g_db_log_psswd'];
$dbname = $GLOBALS['g_db_log_dbName'];
}elseif($servername == "yulu"){
$servername = $GLOBALS['g_db_log_serverName'];
$username = $GLOBALS['g_db_log_usrName'];
$password = $GLOBALS['g_db_log_psswd'];
$dbname = "yulu";
}
$conn = new mysqli($servername, $username, $password, $dbname);
if ($conn->connect_error)
{
die("Mysql Connect Failed: " . $conn->connect_error);
}
return ($conn);
}
//get table row number::(data_cnnct var,table name) ::(row number)
function db__rowNum($conn,$table,$clmnName="",$value="",$clmnName2="",$value2="")
{
$table=db__antisql($table);
$clmnName=db__antisql($clmnName);
$value=db__antisql($value);
$clmnName2=db__antisql($clmnName2);
$value2=db__antisql($value2);
if($clmnName=="") $sql = "SELECT COUNT(*) FROM $table";
elseif($clmnName2=="") $sql = "SELECT COUNT(*) FROM $table where $clmnName='$value'";
else $sql = "SELECT COUNT(*) FROM $table where $clmnName='$value' AND $clmnName2='$value2'";
$row_count = $conn->query($sql);
list($row_num) = $row_count->fetch_row();
return ($row_num);
}
//get row data from database::(data_cnnct var, table name,column name, column value)::(row info)
function db__getData($conn,$table,$clmnName="",$value="",$clmnName2="",$value2="",$sql_plus = "")
{
$table=db__antisql($table);
$clmnName=db__antisql($clmnName);
$value=db__antisql($value);
$clmnName2=db__antisql($clmnName2);
$value2=db__antisql($value2);
if($clmnName=="") $sql = "SELECT * FROM $table $sql_plus";
elseif($clmnName2=="") $sql = "SELECT * FROM $table where $clmnName='$value' $sql_plus";
else $sql = "SELECT * FROM $table where $clmnName='$value' AND $clmnName2='$value2' $sql_plus";
$result = $conn->query($sql);
//no data
if ($result->num_rows > 0) {}else{return 404;}
$i=0;
$arr=array();
while($row = $result->fetch_assoc()) {
$arr[$i++]=$row;
}
return ($arr);
}
//fnct for insert a row to database
function db__insertData($conn,$table,$content)
{
$table=db__antisql($table);
$key=array_keys($content);
$key=db__antisql($key);
$sql="insert INTO $table (";
for($i=0;$i<count($key);$i++)
{
$sql.="$key[$i]";
if($i!=count($key)-1) $sql.=", ";
}
$sql.=") VALUES (";
for($i=0;$i<count($key);$i++)
{
$tmp_key=$key[$i];
$content[$tmp_key]=db__antisql($content[$tmp_key]);
$sql.="'$content[$tmp_key]'";
if($i!=count($key)-1) $sql.=", ";
}
$sql.=")";
if (!($conn->query($sql) === TRUE)) echo "SQL Insert Error: " . $sql . "<br>" . $conn->error;
}
//fnct for update a row to database without check
function db__updateData($conn,$table,$content,$index)
{
$key=array_keys($content);
$key=db__antisql($key);
$sql="UPDATE $table SET ";
for($i=0;$i<count($key);$i++)
{
$tmp_key=$key[$i];
$content[$tmp_key]=db__antisql($content[$tmp_key]);
$sql.="$key[$i]='$content[$tmp_key]'";
if($i!=count($key)-1) $sql.=", ";
}
$key=array_keys($index);
$key=db__antisql($key);
$sql.=" WHERE ";
for($i=0;$i<count($key);$i++)
{
$tmp_key=$key[$i];
$index[$tmp_key]=db__antisql($index[$tmp_key]);
$sql.="$tmp_key='$index[$tmp_key]'";
if($i!=count($key)-1) $sql.=" AND ";
}
if (!($conn->query($sql) === TRUE)) echo "SQL Insert Error: " . $sql . "<br>" . $conn->error;
}
//push row data from database::(data_cnnct var, table name,column name, column value)::(row info)
function db__pushData($conn,$table,$content,$index="",$is_force=1)
{
if($index)
{
$index_keys=array_keys($index);
if(count($index_keys)==1) $result=db__rowNum($conn,$table,$index_keys[0],$index[$index_keys[0]]);
elseif(count($index_keys)==2) $result=db__rowNum($conn,$table,$index_keys[0],$index[$index_keys[0]],$index_keys[1],$index[$index_keys[1]]);
else return -1;
if($result>0) db__updateData($conn,$table,$content,$index);
else if($is_force) db__insertData($conn,$table,$content);
}
else
db__insertData($conn,$table,$content);
}
function db__delData($conn, $table, $clmnName, $value)
{
$value=db__antisql($value);
$clmnName=db__antisql($clmnName);
$sql = "DELETE FROM $table WHERE $clmnName = '$value'";
$conn->query($sql);
}
//anti sql
function db__antisql($str)
{
return(str_ireplace("'","",$str));
}
/*****log******/
function yimian__log($table, $val, $index = "", $cnt = null){
if(!isset($cnt)) $cnt = db__connect("log");
if($index != "") db__pushData($cnt, $table, $val, $index);
else db__pushData($cnt, $table, $val);
}
/** get from address **/
function get_from(){
if($_SERVER['HTTP_REFERER']) return $_SERVER['HTTP_REFERER'];
elseif($_REQUEST['from']) return $_REQUEST['from'];
}
function get_from_domain(){
$str = str_replace("http://","",get_from());
$str = str_replace("https://","",$str);
$strdomain = explode("/",$str);
return $strdomain[0];
}
/*****curl*****/
function curl__post($url = '', $param) {
if(empty($url)) {
return false;
}
$o = "";
foreach ($param as $k => $v) {
$o .= "$k=".urlencode($v)."&" ;
}
$postUrl = $url;
$curlPost = substr($o,0,-1);
$ch = curl_init();//初始化curl
curl_setopt($ch, CURLOPT_URL,$postUrl);//抓取指定网页
curl_setopt($ch, CURLOPT_HEADER, 0);//设置header
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);//要求结果为字符串且输出到屏幕上
curl_setopt($ch, CURLOPT_POST, 1);//post提交方式
curl_setopt($ch, CURLOPT_POSTFIELDS, $curlPost);
$data = curl_exec($ch);//运行curl
curl_close($ch);
return $data;
}
/* get IP */
function get_ip(){
return getIp();
}
function getIp()
{
if (isset($_SERVER)) {
if (isset($_SERVER['HTTP_X_FORWARDED_FOR'])) {
$arr = explode(',', $_SERVER['HTTP_X_FORWARDED_FOR']);
foreach ($arr as $ip) {
$ip = trim($ip);
if ($ip != 'unknown') {
$realip = $ip;
break;
}
}
} else if (isset($_SERVER['HTTP_CLIENT_IP'])) {
$realip = $_SERVER['HTTP_CLIENT_IP'];
} else if (isset($_SERVER['REMOTE_ADDR'])) {
$realip = $_SERVER['REMOTE_ADDR'];
} else {
$realip = '0.0.0.0';
}
} else if (getenv('HTTP_X_FORWARDED_FOR')) {
$realip = getenv('HTTP_X_FORWARDED_FOR');
} else if (getenv('HTTP_CLIENT_IP')) {
$realip = getenv('HTTP_CLIENT_IP');
} else {
$realip = getenv('REMOTE_ADDR');
}
preg_match('/[\\d\\.]{7,15}/', $realip, $onlineip);
$realip = (!empty($onlineip[0]) ? $onlineip[0] : '0.0.0.0');
return $realip;
}
/* obs get img */
function getImg($path, $time = 300){
return str_replace('yimian-image.obs.cn-east-2.myhuaweicloud.com:443','image.yimian.xyz',trim(exec("obs sign obs://yimian-image/". $path ." -e=". $time)));
}
function getImgsInfo($type){
$arr_os = array();
$arr = array();
ini_set("pcre.backtrack_limit" , -1); ini_set("pcre.recursion_limit" , -1); ini_set("memory_limit" , "1024M");
exec('obs ls obs://yimian-image/'.$type.' -limit=-1', $arr_os);
//echo count($arr_os);
$str = implode ($arr_os);
preg_match_all('/img_(\S*?)_(\d{2,4})x(\d{2,4})_(\S*?)_(\S*?)_(\S*?).(jpe?g|png|gif|svg)\b/', $str, $arr);
return $arr;
}
/*****gugu*****/
function yimian__gugu($body){
$body = iconv("UTF-8","gbk//TRANSLIT",$body);
$url = "http://open.memobird.cn/home/printpaper";
return curl__post($url, array("ak" => $GLOBALS['ggj_ak'], "userID" => $GLOBALS['ggj_userID'], "memobirdID" => $GLOBALS['ggj_memobirdID'], "printcontent" => "T:".base64_encode($body)."", "timestamp" => "".time().""));
}
function gugu__send($ak, $userID, $memobirdID, $body){
$body = iconv("UTF-8","gbk//TRANSLIT",$body);
$url = "http://open.memobird.cn/home/printpaper";
return curl__post($url, array("ak" => $ak, "userID" => $userID, "memobirdID" => $memobirdID, "printcontent" => "T:".base64_encode($body)."", "timestamp" => "".time().""));
}
/** function for mail **/
function yimian__mail($to, $subject, $body, $from){
if($from == "") $from = "IoTcat 呓喵酱";
if($body == "") $body = "额(⊙﹏⊙) 未找到指定的邮件内容耶( •̀ ω •́ )y<br/><br/>更多信息请咨询<a href = 'https://iotcat.me'>IoTcat</a>期待你的回应啦~";
if($subject == "") $subject = "来自IoTcat的一声问候~";
$data = array(
'fromName' => $from, // 发件人名称
'from' => "admin@iotcat.xyz", // 发件地址
'to' => $to, // 收件地址
'replyTo' => "i@iotcat.me", // 回信地址
'subject' => $subject,
'html' => $body
);
// 当前请求区域
// 杭州
// API地址
$data['api'] = 'https://dm.aliyuncs.com/';
// API版本号
$data['version'] = '2015-11-23';
// 机房信息
$data['region'] = 'cn-hangzhou';
// AccessKeyId
$data['accessid'] = $GLOBALS['aym_AccessKey'];
// AccessKeySecret
$data['accesssecret'] = $GLOBALS['aym_SecretKey'];
// 是否成功
return aliyun($data);
}
//mail alliyun api
function aliyun($param)
{
// 重新组合为阿里云所使用的参数
$data = array(
'Action' => 'SingleSendMail', // 操作接口名
'AccountName' => $param['from'], // 发件地址
'ReplyToAddress' => "true", // 回信地址
'AddressType' => 1, // 地址类型
'ToAddress' => $param['to'], // 收件地址
'FromAlias' => $param['fromName'], // 发件人名称
'Subject' => $param['subject'], // 邮件标题
'HtmlBody' => $param['html'], // 邮件内容
'Format' => 'JSON', // 返回JSON
'Version' => $param['version'], // API版本号
'AccessKeyId' => $param['accessid'], // Access Key ID
'SignatureMethod' => 'HMAC-SHA1', // 签名方式
'Timestamp' => gmdate('Y-m-d\TH:i:s\Z'), // 请求时间
'SignatureVersion' => '1.0', // 签名算法版本
'SignatureNonce' => md5(time()), // 唯一随机数
'RegionId' => $param['region'] // 机房信息
);
// 请求签名
$data['Signature'] = sign($data, $param['accesssecret']);
// 初始化Curl
$ch = curl_init();
// 设置为POST请求
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'POST');
// 请求地址
curl_setopt($ch, CURLOPT_URL, $param['api']);
// 返回数据
curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);
// 提交参数
curl_setopt($ch, CURLOPT_POSTFIELDS, getPostHttpBody($data));
// 关闭ssl验证
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, FALSE);
// 执行请求
$result = curl_exec($ch);
// 获取错误代码
$errno = curl_errno($ch);
// 获取错误信息
$error = curl_error($ch);
// 获取返回状态码
$httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
// 关闭请求
curl_close($ch);
// 成功标识
$flag = TRUE;
// 如果开启了Debug
if (1) {
// 记录时间
$log = '[Aliyun] ' . date('Y-m-d H:i:s') . ': ' . PHP_EOL;
// 如果失败
if ( $errno ) {
// 设置失败
$flag = FALSE;
$log .= '邮件发送失败, 错误代码:' . $errno . ',错误提示: ' . $error . PHP_EOL;
}
// 如果失败
if ( 400 <= $httpCode ) {
// 设置失败
$flag = FALSE;
// 尝试转换json
if ( $json = json_decode($result) ) {
$log .= '邮件发送失败,错误代码:' . $json->Code . ',错误提示:' . $json->Message . PHP_EOL;
} else {
$log .= '邮件发送失败, 请求返回HTTP Code:' . $httpCode . PHP_EOL;
}
}
// 记录返回值
$log .= '邮件发送返回数据:' . serialize($result) . PHP_EOL;
// 写入文件
}
yimian__log("log_mail",array("timestamp" => date('Y-m-d H:i:s', time()), "to_" => $param['to'], "from_" => $param['fromName'], "subject" => $param['subject'], "body" => $param['html'], "success" => (($flag)?1:0), "return_" => $log));
// 返回结果
//echo $log;
return $flag;
}
/**
* 阿里云签名
*
* @static
* @access private
*
* @param array $param 签名参数
* @param string $accesssecret 秘钥
*
* @return string
*/
function sign($param, $accesssecret)
{
// 参数排序
ksort($param);
// 组合基础
$stringToSign = 'POST&' . percentEncode('/') . '&';
// 临时变量
$tmp = '';
// 循环参数列表
foreach ( $param as $k => $v ) {
// 组合参数
$tmp .= '&' . percentEncode($k) . '=' . percentEncode($v);
}
// 去除最后一个&
$tmp = trim($tmp, '&');
// 组合签名参数
$stringToSign = $stringToSign . percentEncode($tmp);
// 数据签名
$signature = base64_encode(hash_hmac('sha1', $stringToSign, $accesssecret . '&', TRUE));
// 返回签名
return $signature;
}
/**
* 阿里云签名编码转换
*
* @static
* @access private
*
* @param string $val 要转换的编码
*
* @return string|string[]|null
*/
function percentEncode($val)
{
// URL编码
$res = urlencode($val);
// 加号转换为%20
$res = preg_replace('/\+/', '%20', $res);
// 星号转换为%2A
$res = preg_replace('/\*/', '%2A', $res);
// %7E转换为~
$res = preg_replace('/%7E/', '~', $res);
return $res;
}
/**
* 阿里云请求参数组合
*
* @static
* @access private
*
* @param array $param 发送参数
*
* @return bool|string
*/
function getPostHttpBody($param)
{
// 空字符串
$str = "";
// 循环参数
foreach ( $param as $k => $v ) {
// 组合参数
$str .= $k . '=' . urlencode($v) . '&';
}
// 去除第一个&
return substr($str, 0, -1);
}

@ -0,0 +1,22 @@
<?php
include './functions.php';
$res = db__getData(db__connect(), 'video');
?>
<html>
<head>
<title>ACG WATCH</title>
<script src="https://cdn.yimian.xyz/ushio-js/ushio-head.min.js"></script>
</head>
<body>
<?php
foreach($res as $i){
echo '<a href="https://acg.watch/player/?url='.$i['url'].'" >'.$i['name'].'</a><br/>';
}
?>
<script src="https://cdn.yimian.xyz/ushio-js/ushio-footer.min.js"></script>
</body>
</html>

@ -2153,3 +2153,15 @@
{"reqId":"hcAWfhhMHkOyhlmLp1F0","level":3,"time":"2020-01-10T01:07:49+00:00","remoteAddr":"180.163.220.67","user":"--","app":"PHP","method":"GET","url":"\/csrftoken","message":"You are using a fallback implementation of the intl extension. Installing the native one is highly recommended instead. at \/home\/yimian\/www\/nextcloud\/3rdparty\/patchwork\/utf8\/src\/Patchwork\/Utf8\/Bootup\/intl.php#18","userAgent":"Mozilla\/5.0 (Linux; U; Android 8.1.0; zh-CN; EML-AL00 Build\/HUAWEIEML-AL00) AppleWebKit\/537.36 (KHTML, like Gecko) Version\/4.0 Chrome\/57.0.2987.108 baidu.sogo.uc.UCBrowser\/11.9.4.974 UWS\/2.13.1.48 Mobile Safari\/537.36 AliApp(DingTalk\/4.5.11) com.alibaba.android.rimet\/10487439 Channel\/227200 language\/zh-CN","version":"17.0.2.1"}
{"reqId":"sLJlzff67OK0fbPmvvf8","level":2,"time":"2020-01-10T01:07:51+00:00","remoteAddr":"180.163.220.67","user":"--","app":"no app in context","method":"GET","url":"\/csrftoken","message":"Temporary directory \/tmp\/phpImg is not present or writable","userAgent":"Mozilla\/5.0 (Linux; U; Android 8.1.0; zh-CN; EML-AL00 Build\/HUAWEIEML-AL00) AppleWebKit\/537.36 (KHTML, like Gecko) Version\/4.0 Chrome\/57.0.2987.108 baidu.sogo.uc.UCBrowser\/11.9.4.974 UWS\/2.13.1.48 Mobile Safari\/537.36 AliApp(DingTalk\/4.5.11) com.alibaba.android.rimet\/10487439 Channel\/227200 language\/zh-CN","version":"17.0.2.1"}
{"reqId":"sLJlzff67OK0fbPmvvf8","level":3,"time":"2020-01-10T01:07:51+00:00","remoteAddr":"180.163.220.67","user":"--","app":"PHP","method":"GET","url":"\/csrftoken","message":"You are using a fallback implementation of the intl extension. Installing the native one is highly recommended instead. at \/home\/yimian\/www\/nextcloud\/3rdparty\/patchwork\/utf8\/src\/Patchwork\/Utf8\/Bootup\/intl.php#18","userAgent":"Mozilla\/5.0 (Linux; U; Android 8.1.0; zh-CN; EML-AL00 Build\/HUAWEIEML-AL00) AppleWebKit\/537.36 (KHTML, like Gecko) Version\/4.0 Chrome\/57.0.2987.108 baidu.sogo.uc.UCBrowser\/11.9.4.974 UWS\/2.13.1.48 Mobile Safari\/537.36 AliApp(DingTalk\/4.5.11) com.alibaba.android.rimet\/10487439 Channel\/227200 language\/zh-CN","version":"17.0.2.1"}
{"reqId":"2SrQGoaozVHGGd3edvvj","level":2,"time":"2020-01-10T22:00:10+00:00","remoteAddr":"39.104.66.36","user":"--","app":"no app in context","method":"GET","url":"\/public\/js\/wind.js","message":"Temporary directory \/tmp\/phpImg is not present or writable","userAgent":"Mozilla\/5.0 (Windows NT 10.0; WOW64; rv:48.0) Gecko\/20100101 Firefox\/48.0","version":"17.0.2.1"}
{"reqId":"2SrQGoaozVHGGd3edvvj","level":3,"time":"2020-01-10T22:00:10+00:00","remoteAddr":"39.104.66.36","user":"--","app":"PHP","method":"GET","url":"\/public\/js\/wind.js","message":"You are using a fallback implementation of the intl extension. Installing the native one is highly recommended instead. at \/home\/yimian\/www\/nextcloud\/3rdparty\/patchwork\/utf8\/src\/Patchwork\/Utf8\/Bootup\/intl.php#18","userAgent":"Mozilla\/5.0 (Windows NT 10.0; WOW64; rv:48.0) Gecko\/20100101 Firefox\/48.0","version":"17.0.2.1"}
{"reqId":"nukq2XTZIf0BuvpJesdh","level":2,"time":"2020-01-10T22:00:10+00:00","remoteAddr":"39.104.66.36","user":"--","app":"no app in context","method":"GET","url":"\/login","message":"Temporary directory \/tmp\/phpImg is not present or writable","userAgent":"Mozilla\/5.0 (Windows NT 10.0; WOW64; rv:48.0) Gecko\/20100101 Firefox\/48.0","version":"17.0.2.1"}
{"reqId":"nukq2XTZIf0BuvpJesdh","level":3,"time":"2020-01-10T22:00:10+00:00","remoteAddr":"39.104.66.36","user":"--","app":"PHP","method":"GET","url":"\/login","message":"You are using a fallback implementation of the intl extension. Installing the native one is highly recommended instead. at \/home\/yimian\/www\/nextcloud\/3rdparty\/patchwork\/utf8\/src\/Patchwork\/Utf8\/Bootup\/intl.php#18","userAgent":"Mozilla\/5.0 (Windows NT 10.0; WOW64; rv:48.0) Gecko\/20100101 Firefox\/48.0","version":"17.0.2.1"}
{"reqId":"DXbVo88nMnoAT4zDyxpz","level":2,"time":"2020-01-10T22:00:17+00:00","remoteAddr":"39.104.66.36","user":"--","app":"no app in context","method":"GET","url":"\/js\/comm.js","message":"Temporary directory \/tmp\/phpImg is not present or writable","userAgent":"Mozilla\/5.0 (Windows NT 10.0; WOW64; rv:48.0) Gecko\/20100101 Firefox\/48.0","version":"17.0.2.1"}
{"reqId":"DXbVo88nMnoAT4zDyxpz","level":3,"time":"2020-01-10T22:00:17+00:00","remoteAddr":"39.104.66.36","user":"--","app":"PHP","method":"GET","url":"\/js\/comm.js","message":"You are using a fallback implementation of the intl extension. Installing the native one is highly recommended instead. at \/home\/yimian\/www\/nextcloud\/3rdparty\/patchwork\/utf8\/src\/Patchwork\/Utf8\/Bootup\/intl.php#18","userAgent":"Mozilla\/5.0 (Windows NT 10.0; WOW64; rv:48.0) Gecko\/20100101 Firefox\/48.0","version":"17.0.2.1"}
{"reqId":"iJnDDyMINmW7m0nVoyEQ","level":2,"time":"2020-01-10T22:00:17+00:00","remoteAddr":"39.104.66.36","user":"--","app":"no app in context","method":"GET","url":"\/login","message":"Temporary directory \/tmp\/phpImg is not present or writable","userAgent":"Mozilla\/5.0 (Windows NT 10.0; WOW64; rv:48.0) Gecko\/20100101 Firefox\/48.0","version":"17.0.2.1"}
{"reqId":"iJnDDyMINmW7m0nVoyEQ","level":3,"time":"2020-01-10T22:00:17+00:00","remoteAddr":"39.104.66.36","user":"--","app":"PHP","method":"GET","url":"\/login","message":"You are using a fallback implementation of the intl extension. Installing the native one is highly recommended instead. at \/home\/yimian\/www\/nextcloud\/3rdparty\/patchwork\/utf8\/src\/Patchwork\/Utf8\/Bootup\/intl.php#18","userAgent":"Mozilla\/5.0 (Windows NT 10.0; WOW64; rv:48.0) Gecko\/20100101 Firefox\/48.0","version":"17.0.2.1"}
{"reqId":"JFwB87M5pK01aSIrr4kG","level":2,"time":"2020-01-10T22:00:17+00:00","remoteAddr":"39.104.66.36","user":"--","app":"no app in context","method":"GET","url":"\/public\/ui\/v1\/js\/sea.js","message":"Temporary directory \/tmp\/phpImg is not present or writable","userAgent":"Mozilla\/5.0 (Windows NT 10.0; WOW64; rv:48.0) Gecko\/20100101 Firefox\/48.0","version":"17.0.2.1"}
{"reqId":"JFwB87M5pK01aSIrr4kG","level":3,"time":"2020-01-10T22:00:17+00:00","remoteAddr":"39.104.66.36","user":"--","app":"PHP","method":"GET","url":"\/public\/ui\/v1\/js\/sea.js","message":"You are using a fallback implementation of the intl extension. Installing the native one is highly recommended instead. at \/home\/yimian\/www\/nextcloud\/3rdparty\/patchwork\/utf8\/src\/Patchwork\/Utf8\/Bootup\/intl.php#18","userAgent":"Mozilla\/5.0 (Windows NT 10.0; WOW64; rv:48.0) Gecko\/20100101 Firefox\/48.0","version":"17.0.2.1"}
{"reqId":"nZ69lgOPnAV2okDf0qCm","level":2,"time":"2020-01-10T22:00:17+00:00","remoteAddr":"39.104.66.36","user":"--","app":"no app in context","method":"GET","url":"\/login","message":"Temporary directory \/tmp\/phpImg is not present or writable","userAgent":"Mozilla\/5.0 (Windows NT 10.0; WOW64; rv:48.0) Gecko\/20100101 Firefox\/48.0","version":"17.0.2.1"}
{"reqId":"nZ69lgOPnAV2okDf0qCm","level":3,"time":"2020-01-10T22:00:17+00:00","remoteAddr":"39.104.66.36","user":"--","app":"PHP","method":"GET","url":"\/login","message":"You are using a fallback implementation of the intl extension. Installing the native one is highly recommended instead. at \/home\/yimian\/www\/nextcloud\/3rdparty\/patchwork\/utf8\/src\/Patchwork\/Utf8\/Bootup\/intl.php#18","userAgent":"Mozilla\/5.0 (Windows NT 10.0; WOW64; rv:48.0) Gecko\/20100101 Firefox\/48.0","version":"17.0.2.1"}

@ -0,0 +1,2 @@
.config.php
.db.key.php
Loading…
Cancel
Save