diff --git a/functions.php b/functions.php index 69547ab..8d4c3dd 100755 --- a/functions.php +++ b/functions.php @@ -336,8 +336,15 @@ function getImgCDNwallpaper($path){ preg_match_all('/img_(\S*?)_(\d{2,4})x(\d{2,4})_(\S*?)_(\S*?)_(\S*?).(jpe?g|png|gif|svg)\b/', $path, $arr); $date = strtotime($arr[1][0].' 00:00:00'); $dateline = strtotime('2021-07-11 00:00:00'); + //$d = 'https://testingcf.jsdelivr.net/'; + $d = 'https://gcore.jsdelivr.net/'; + // $d = 'https://fastly.jsdelivr.net/'; + // $d = 'https://cdn.jsdelivr.net/'; + // $d = 'https://originfastly.jsdelivr.net/'; + // $d = 'https://quantil.jsdelivr.net/'; if($date < $dateline) - return 'https://proxy.yimian.xyz/get/?url='.base64_encode(str_replace('wallpaper','https://cdn.jsdelivr.net/npm/ushio-api-img-wallpaper@1.1'.date('y.nw', $date).'',$path)); + //return 'https://proxy.yimian.xyz/get/?url='.base64_encode(str_replace('wallpaper','https://cdn.jsdelivr.net/npm/ushio-api-img-wallpaper@1.1'.date('y.nw', $date).'',$path)); + return str_replace('wallpaper',$d.'npm/ushio-api-img-wallpaper@1.1'.date('y.nw', $date).'',$path); else return getImg($path); } diff --git a/index.php b/index.php index d4f171f..fba307c 100755 --- a/index.php +++ b/index.php @@ -170,8 +170,9 @@ yimian__log("log_api", array("api" => "img", "timestamp" => date('Y-m-d H:i:s', function returnImg($path){ if($GLOBALS['type'] != 'wallpaper' && $GLOBALS['type'] != 'imgbed' && $GLOBALS['type'] != 'path' /*&& ((!in_array($GLOBALS['__from'], $GLOBALS['whiteList']) && ($GLOBALS['_num'] > 0 || $GLOBALS['_ip'] > 0)) || ($GLOBALS['_ip'] > 0))*/) { - if(get_from()=='')$url = getImgCDN($path); - else $url = getImgCDNProxy($path); + $url = getImgCDN($path); + //if(get_from()=='')$url = getImgCDN($path); + //else $url = getImgCDNProxy($path); //$url = getImgOneindex($path); // $url = getImg($path); }else{