Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f34a28ecbd | ||
|
|
8ef3e2e802 | ||
|
|
4826b8c758 | ||
|
|
23bb5aea41 | ||
|
|
268328b2ac | ||
|
|
bc64066301 | ||
|
|
f5a6c11dda |
@@ -0,0 +1,77 @@
|
|||||||
|
ARG ALPINE_VERSION=3.24
|
||||||
|
FROM alpine:${ALPINE_VERSION}
|
||||||
|
# Setup document root
|
||||||
|
WORKDIR /app/www
|
||||||
|
|
||||||
|
# Install packages and remove default server definition
|
||||||
|
RUN apk add --no-cache \
|
||||||
|
bash \
|
||||||
|
curl \
|
||||||
|
nginx \
|
||||||
|
php83 \
|
||||||
|
php83-ctype \
|
||||||
|
php83-curl \
|
||||||
|
php83-dom \
|
||||||
|
php83-fileinfo \
|
||||||
|
php83-fpm \
|
||||||
|
php83-gd \
|
||||||
|
php83-gettext \
|
||||||
|
php83-intl \
|
||||||
|
php83-iconv \
|
||||||
|
php83-mbstring \
|
||||||
|
php83-mysqli \
|
||||||
|
php83-opcache \
|
||||||
|
php83-openssl \
|
||||||
|
php83-phar \
|
||||||
|
php83-sodium \
|
||||||
|
php83-session \
|
||||||
|
php83-simplexml \
|
||||||
|
php83-tokenizer \
|
||||||
|
php83-xml \
|
||||||
|
php83-xmlreader \
|
||||||
|
php83-xmlwriter \
|
||||||
|
php83-zip \
|
||||||
|
php83-pdo \
|
||||||
|
php83-pdo_mysql \
|
||||||
|
php83-pdo_sqlite \
|
||||||
|
supervisor \
|
||||||
|
&& ln -sf /usr/bin/php83 /usr/bin/php
|
||||||
|
|
||||||
|
RUN rm -rf /var/cache/apk/* /tmp/*
|
||||||
|
|
||||||
|
# Configure nginx - http
|
||||||
|
COPY config/nginx.conf /etc/nginx/nginx.conf
|
||||||
|
|
||||||
|
# Configure PHP-FPM
|
||||||
|
ENV PHP_INI_DIR /etc/php83
|
||||||
|
COPY config/fpm-pool.conf ${PHP_INI_DIR}/php-fpm.d/www.conf
|
||||||
|
COPY config/php.ini ${PHP_INI_DIR}/conf.d/custom.ini
|
||||||
|
|
||||||
|
# Configure supervisord
|
||||||
|
COPY config/supervisord.conf /etc/supervisor/conf.d/supervisord.conf
|
||||||
|
|
||||||
|
# CACHE_BUST 须写进每条相关 RUN,否则 GHA/BuildKit 可能单独命中 composer 相关层缓存,vendor 仍来自旧构建
|
||||||
|
ARG CACHE_BUST=local
|
||||||
|
|
||||||
|
# Add application
|
||||||
|
RUN mkdir -p /usr/src && echo "$CACHE_BUST" >/dev/null && wget --no-cache https://github.com/netcccyun/toolbox/archive/refs/heads/main.zip -O /usr/src/www.zip && unzip /usr/src/www.zip -d /usr/src/ && mv /usr/src/toolbox-main /usr/src/www && rm -f /usr/src/www.zip
|
||||||
|
|
||||||
|
# Install composer(与下面 install 一并随 CACHE_BUST 失效)
|
||||||
|
RUN echo "$CACHE_BUST" >/dev/null && wget https://getcomposer.org/download/latest-stable/composer.phar -O /usr/local/bin/composer && chmod +x /usr/local/bin/composer
|
||||||
|
|
||||||
|
RUN echo "$CACHE_BUST" >/dev/null && composer install -d /usr/src/www --no-interaction --no-dev --optimize-autoloader --no-cache
|
||||||
|
|
||||||
|
RUN adduser -D -s /sbin/nologin -g www www && chown -R www:www /usr/src/www /var/lib/nginx /var/log/nginx
|
||||||
|
|
||||||
|
# copy entrypoint script
|
||||||
|
COPY entrypoint.sh /entrypoint.sh
|
||||||
|
ENTRYPOINT ["sh", "/entrypoint.sh"]
|
||||||
|
|
||||||
|
# Expose the port nginx is reachable on
|
||||||
|
EXPOSE 80
|
||||||
|
|
||||||
|
# Let supervisord start nginx & php-fpm
|
||||||
|
CMD /usr/sbin/crond && /usr/bin/supervisord -c /etc/supervisor/conf.d/supervisord.conf
|
||||||
|
|
||||||
|
# Configure a healthcheck to validate that everything is up&running
|
||||||
|
HEALTHCHECK --timeout=10s CMD curl --silent --fail http://127.0.0.1/fpm-ping || exit 1
|
||||||
@@ -0,0 +1,21 @@
|
|||||||
|
[global]
|
||||||
|
error_log = /dev/stderr
|
||||||
|
|
||||||
|
[www]
|
||||||
|
listen = /run/php-fpm.sock
|
||||||
|
listen.backlog = 8192
|
||||||
|
listen.allowed_clients = 127.0.0.1
|
||||||
|
listen.owner = www
|
||||||
|
listen.group = www
|
||||||
|
listen.mode = 0666
|
||||||
|
user = www
|
||||||
|
group = www
|
||||||
|
pm.status_path = /fpm-status
|
||||||
|
pm = ondemand
|
||||||
|
pm.max_children = 100
|
||||||
|
pm.process_idle_timeout = 60s;
|
||||||
|
pm.max_requests = 1000
|
||||||
|
clear_env = no
|
||||||
|
catch_workers_output = yes
|
||||||
|
decorate_workers_output = no
|
||||||
|
ping.path = /fpm-ping
|
||||||
@@ -0,0 +1,94 @@
|
|||||||
|
user www;
|
||||||
|
worker_processes auto;
|
||||||
|
error_log stderr warn;
|
||||||
|
pid /run/nginx.pid;
|
||||||
|
|
||||||
|
events {
|
||||||
|
worker_connections 1024;
|
||||||
|
}
|
||||||
|
|
||||||
|
http {
|
||||||
|
include mime.types;
|
||||||
|
# Threat files with a unknown filetype as binary
|
||||||
|
default_type application/octet-stream;
|
||||||
|
|
||||||
|
# Define custom log format to include reponse times
|
||||||
|
log_format main_timed '$remote_addr - $remote_user [$time_local] "$request" '
|
||||||
|
'$status $body_bytes_sent "$http_referer" '
|
||||||
|
'"$http_user_agent" "$http_x_forwarded_for" '
|
||||||
|
'$request_time $upstream_response_time $pipe $upstream_cache_status';
|
||||||
|
|
||||||
|
access_log /dev/stdout main_timed;
|
||||||
|
error_log /dev/stderr crit;
|
||||||
|
|
||||||
|
keepalive_timeout 65;
|
||||||
|
|
||||||
|
server_tokens off;
|
||||||
|
|
||||||
|
# Enable gzip compression by default
|
||||||
|
gzip on;
|
||||||
|
gzip_min_length 1k;
|
||||||
|
gzip_buffers 4 16k;
|
||||||
|
gzip_proxied expired no-cache no-store private auth;
|
||||||
|
gzip_types text/plain application/javascript application/x-javascript text/javascript text/css application/xml;
|
||||||
|
gzip_vary on;
|
||||||
|
gzip_disable "MSIE [1-6]\.";
|
||||||
|
|
||||||
|
# Include server configs
|
||||||
|
server {
|
||||||
|
listen [::]:80 default_server;
|
||||||
|
listen 80 default_server;
|
||||||
|
server_name _;
|
||||||
|
|
||||||
|
sendfile on;
|
||||||
|
tcp_nodelay on;
|
||||||
|
absolute_redirect off;
|
||||||
|
|
||||||
|
root /app/www/public;
|
||||||
|
index index.php index.html;
|
||||||
|
|
||||||
|
# Pass the PHP scripts to PHP-FPM listening on php-fpm.sock
|
||||||
|
location ~ \.php$ {
|
||||||
|
try_files $uri =404;
|
||||||
|
fastcgi_split_path_info ^(.+\.php)(/.+)$;
|
||||||
|
fastcgi_pass unix:/run/php-fpm.sock;
|
||||||
|
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||||
|
fastcgi_index index.php;
|
||||||
|
include fastcgi_params;
|
||||||
|
}
|
||||||
|
|
||||||
|
#rewrite rule for pretty urls
|
||||||
|
location / {
|
||||||
|
if (!-e $request_filename){
|
||||||
|
rewrite ^(.*)$ /index.php?s=$1 last; break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
# Set the cache-control headers on assets to cache for 5 days
|
||||||
|
location ~* \.(jpg|jpeg|gif|png|ico|bmp)$ {
|
||||||
|
access_log off;
|
||||||
|
expires 30d;
|
||||||
|
}
|
||||||
|
|
||||||
|
location ~* \.(css|js)$ {
|
||||||
|
access_log off;
|
||||||
|
expires 12h;
|
||||||
|
}
|
||||||
|
|
||||||
|
# Deny access to . files, for security
|
||||||
|
location ~ /\. {
|
||||||
|
log_not_found off;
|
||||||
|
deny all;
|
||||||
|
}
|
||||||
|
|
||||||
|
# Allow fpm ping and status from localhost
|
||||||
|
location ~ ^/(fpm-status|fpm-ping)$ {
|
||||||
|
access_log off;
|
||||||
|
allow 127.0.0.1;
|
||||||
|
deny all;
|
||||||
|
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||||
|
include fastcgi_params;
|
||||||
|
fastcgi_pass unix:/run/php-fpm.sock;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
[PHP]
|
||||||
|
short_open_tag = On
|
||||||
|
expose_php = Off
|
||||||
|
max_execution_time = 300
|
||||||
|
post_max_size = 50M
|
||||||
|
upload_max_filesize = 50M
|
||||||
|
[Date]
|
||||||
|
date.timezone = PRC
|
||||||
|
[Opcache]
|
||||||
|
opcache.enable=1
|
||||||
|
opcache.enable_cli=1
|
||||||
|
opcache.memory_consumption=128
|
||||||
|
opcache.interned_strings_buffer=32
|
||||||
|
opcache.max_accelerated_files=10000
|
||||||
|
opcache.revalidate_freq=30
|
||||||
@@ -0,0 +1,25 @@
|
|||||||
|
[supervisord]
|
||||||
|
nodaemon=true
|
||||||
|
logfile=/dev/null
|
||||||
|
logfile_maxbytes=0
|
||||||
|
pidfile=/run/supervisord.pid
|
||||||
|
|
||||||
|
[program:php-fpm]
|
||||||
|
command=php-fpm83 -F
|
||||||
|
stdout_logfile=/dev/stdout
|
||||||
|
stdout_logfile_maxbytes=0
|
||||||
|
stderr_logfile=/dev/stderr
|
||||||
|
stderr_logfile_maxbytes=0
|
||||||
|
autostart=true
|
||||||
|
autorestart=false
|
||||||
|
startretries=0
|
||||||
|
|
||||||
|
[program:nginx]
|
||||||
|
command=nginx -g 'daemon off;'
|
||||||
|
stdout_logfile=/dev/stdout
|
||||||
|
stdout_logfile_maxbytes=0
|
||||||
|
stderr_logfile=/dev/stderr
|
||||||
|
stderr_logfile_maxbytes=0
|
||||||
|
autostart=true
|
||||||
|
autorestart=false
|
||||||
|
startretries=0
|
||||||
@@ -0,0 +1,18 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
if [ ! -f /app/www/public/index.php ] || [ ! -f /app/firstrun ]; then
|
||||||
|
echo 'Copying new files'
|
||||||
|
\cp -a /usr/src/www /app/
|
||||||
|
|
||||||
|
if [ -d /app/www/runtime/cache ]; then
|
||||||
|
rm -rf /app/www/runtime/*
|
||||||
|
fi
|
||||||
|
|
||||||
|
chown -R www:www /app/www
|
||||||
|
|
||||||
|
touch /app/firstrun
|
||||||
|
fi
|
||||||
|
|
||||||
|
exec "$@"
|
||||||
@@ -0,0 +1,59 @@
|
|||||||
|
# 手动触发:构建多架构镜像(amd64 / arm64),仅推送 latest 至 Docker Hub 与华为云 SWR。
|
||||||
|
# Dockerfile 与构建上下文位于 .github/docker/ 目录。
|
||||||
|
#
|
||||||
|
# 需在仓库 Settings → Secrets 中配置:
|
||||||
|
# DOCKERHUB_USERNAME / DOCKERHUB_TOKEN(Docker Hub 访问令牌)
|
||||||
|
# HUAWEI_SWR_USERNAME / HUAWEI_SWR_PASSWORD(华为云 SWR 登录凭证,与本地 docker login swr.cn-east-3.myhuaweicloud.com 一致)
|
||||||
|
|
||||||
|
name: Docker Build
|
||||||
|
|
||||||
|
on:
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build-and-push:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v7
|
||||||
|
|
||||||
|
- name: Set up QEMU
|
||||||
|
uses: docker/setup-qemu-action@v4
|
||||||
|
|
||||||
|
- name: Set up Docker Buildx
|
||||||
|
uses: docker/setup-buildx-action@v4
|
||||||
|
|
||||||
|
- name: Log in to Docker Hub
|
||||||
|
uses: docker/login-action@v4
|
||||||
|
with:
|
||||||
|
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||||
|
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||||
|
|
||||||
|
- name: Log in to Huawei SWR
|
||||||
|
uses: docker/login-action@v4
|
||||||
|
with:
|
||||||
|
registry: swr.cn-east-3.myhuaweicloud.com
|
||||||
|
username: ${{ secrets.HUAWEI_SWR_USERNAME }}
|
||||||
|
password: ${{ secrets.HUAWEI_SWR_PASSWORD }}
|
||||||
|
|
||||||
|
- name: Build and push (Docker Hub + Huawei SWR, latest only)
|
||||||
|
uses: docker/build-push-action@v7
|
||||||
|
with:
|
||||||
|
context: .github/docker
|
||||||
|
file: .github/docker/Dockerfile
|
||||||
|
platforms: linux/amd64,linux/arm64
|
||||||
|
outputs: type=registry,oci-mediatypes=false
|
||||||
|
# 每次运行唯一,打破「下载源码 + composer」等层的缓存,否则会一直用首次构建时的层
|
||||||
|
build-args: |
|
||||||
|
CACHE_BUST=${{ github.sha }}-${{ github.run_id }}-${{ github.run_attempt }}
|
||||||
|
# 避免向仓库推送 attestations;部分镜像仓库(含部分 SWR 场景)无法解析导致 “fail to parse manifest.json”
|
||||||
|
provenance: false
|
||||||
|
sbom: false
|
||||||
|
tags: |
|
||||||
|
netcccyun/toolbox:latest
|
||||||
|
swr.cn-east-3.myhuaweicloud.com/netcccyun/toolbox:latest
|
||||||
|
cache-from: type=gha
|
||||||
|
cache-to: type=gha,mode=max
|
||||||
@@ -12,7 +12,7 @@
|
|||||||
|
|
||||||
### 🎊 环境要求
|
### 🎊 环境要求
|
||||||
|
|
||||||
* `PHP` >= 7.4
|
* `PHP` >= 8.2
|
||||||
* `MySQL` >= 5.6
|
* `MySQL` >= 5.6
|
||||||
* `fileinfo`扩展
|
* `fileinfo`扩展
|
||||||
* 使用`Redis`缓存需安装`Redis`扩展
|
* 使用`Redis`缓存需安装`Redis`扩展
|
||||||
@@ -72,6 +72,12 @@ location / {
|
|||||||
docker run --name toolbox -dit -p 8081:80 -v /var/toolbox:/app/www netcccyun/toolbox
|
docker run --name toolbox -dit -p 8081:80 -v /var/toolbox:/app/www netcccyun/toolbox
|
||||||
```
|
```
|
||||||
|
|
||||||
|
从国内镜像地址拉取:
|
||||||
|
|
||||||
|
```
|
||||||
|
docker pull swr.cn-east-3.myhuaweicloud.com/netcccyun/toolbox:latest
|
||||||
|
```
|
||||||
|
|
||||||
#### 🍓 鸣谢
|
#### 🍓 鸣谢
|
||||||
|
|
||||||
* [aoaostar](https://github.com/aoaostar/toolbox)
|
* [aoaostar](https://github.com/aoaostar/toolbox)
|
||||||
|
|||||||
@@ -4,5 +4,9 @@ namespace app;
|
|||||||
// 应用请求对象类
|
// 应用请求对象类
|
||||||
class Request extends \think\Request
|
class Request extends \think\Request
|
||||||
{
|
{
|
||||||
|
/** @var bool 用户是否登录 */
|
||||||
|
public $islogin = false;
|
||||||
|
|
||||||
|
/** @var array|null 当前登录用户 */
|
||||||
|
public $user = null;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -143,6 +143,25 @@ function get_curl($url, $post=0, $referer=0, $cookie=0, $header=0, $ua=0, $nobod
|
|||||||
return $ret;
|
return $ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function get_location_url($url){
|
||||||
|
$ch = curl_init();
|
||||||
|
curl_setopt($ch, CURLOPT_URL, $url);
|
||||||
|
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
|
||||||
|
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);
|
||||||
|
$httpheader[] = "Accept: */*";
|
||||||
|
$httpheader[] = "Accept-Encoding: gzip,deflate,sdch";
|
||||||
|
$httpheader[] = "Accept-Language: zh-CN,zh;q=0.8";
|
||||||
|
$httpheader[] = "Connection: close";
|
||||||
|
curl_setopt($ch, CURLOPT_HTTPHEADER, $httpheader);
|
||||||
|
curl_setopt($ch, CURLOPT_USERAGENT, "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.198 Safari/537.36");
|
||||||
|
curl_setopt($ch, CURLOPT_ENCODING, "gzip");
|
||||||
|
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
|
||||||
|
curl_exec($ch);
|
||||||
|
$location = curl_getinfo($ch, CURLINFO_REDIRECT_URL);
|
||||||
|
curl_close($ch);
|
||||||
|
return $location;
|
||||||
|
}
|
||||||
|
|
||||||
function jsonp_decode($jsonp, $assoc = false)
|
function jsonp_decode($jsonp, $assoc = false)
|
||||||
{
|
{
|
||||||
$jsonp = trim($jsonp);
|
$jsonp = trim($jsonp);
|
||||||
|
|||||||
+108
-37
@@ -1,5 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace app\lib;
|
namespace app\lib;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 极验3.0 lib
|
* 极验3.0 lib
|
||||||
*/
|
*/
|
||||||
@@ -7,25 +9,28 @@ class GeetestLib
|
|||||||
{
|
{
|
||||||
const SDK_VERSION = 'php_3.0.0';
|
const SDK_VERSION = 'php_3.0.0';
|
||||||
const JSON_FORMAT = "1";
|
const JSON_FORMAT = "1";
|
||||||
|
|
||||||
private $geetest_id;
|
private $geetest_id;
|
||||||
private $geetest_key;
|
private $geetest_key;
|
||||||
|
|
||||||
public function __construct($geetest_id, $geetest_key) {
|
public function __construct($geetest_id, $geetest_key)
|
||||||
|
{
|
||||||
$this->geetest_id = $geetest_id;
|
$this->geetest_id = $geetest_id;
|
||||||
$this->geetest_key = $geetest_key;
|
$this->geetest_key = $geetest_key;
|
||||||
}
|
}
|
||||||
|
|
||||||
//验证初始化
|
//验证初始化
|
||||||
public function pre_process($params) {
|
public function pre_process($params)
|
||||||
if(!empty($this->geetest_id) && !empty($this->geetest_key)){
|
{
|
||||||
|
if (!empty($this->geetest_id) && !empty($this->geetest_key)) {
|
||||||
return $this->pre_process_api($params);
|
return $this->pre_process_api($params);
|
||||||
}else{
|
} else {
|
||||||
return $this->pre_process_demo($params);
|
return $this->pre_process_demo($params);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private function pre_process_api($params) {
|
private function pre_process_api($params)
|
||||||
|
{
|
||||||
$public_params = [
|
$public_params = [
|
||||||
'digestmod' => 'md5',
|
'digestmod' => 'md5',
|
||||||
'gt' => $this->geetest_id,
|
'gt' => $this->geetest_id,
|
||||||
@@ -35,58 +40,65 @@ class GeetestLib
|
|||||||
$params = array_merge($params, $public_params);
|
$params = array_merge($params, $public_params);
|
||||||
$url = 'http://api.geetest.com/register.php?' . http_build_query($params);
|
$url = 'http://api.geetest.com/register.php?' . http_build_query($params);
|
||||||
$res = get_curl($url);
|
$res = get_curl($url);
|
||||||
$arr = json_decode($res, true);
|
if ($res) {
|
||||||
if($arr && isset($arr['challenge'])){
|
$arr = json_decode($res, true);
|
||||||
return $this->success_process($arr['challenge']);
|
if (isset($arr['challenge'])) {
|
||||||
}else{
|
return $this->success_process($arr['challenge']);
|
||||||
return $this->failback_process();
|
}
|
||||||
}
|
}
|
||||||
|
return $this->failback_process();
|
||||||
}
|
}
|
||||||
|
|
||||||
private function success_process($challenge) {
|
private function success_process($challenge)
|
||||||
|
{
|
||||||
$challenge = md5($challenge . $this->geetest_key);
|
$challenge = md5($challenge . $this->geetest_key);
|
||||||
$result = array(
|
$result = array(
|
||||||
'success' => 1,
|
'success' => 1,
|
||||||
'gt' => $this->geetest_id,
|
'gt' => $this->geetest_id,
|
||||||
'challenge' => $challenge,
|
'challenge' => $challenge,
|
||||||
'new_captcha'=>true
|
'new_captcha' => true
|
||||||
);
|
);
|
||||||
return $result;
|
return $result;
|
||||||
}
|
}
|
||||||
|
|
||||||
private function failback_process() {
|
private function failback_process()
|
||||||
|
{
|
||||||
$challenge = md5(uniqid(mt_rand(), true) . microtime());
|
$challenge = md5(uniqid(mt_rand(), true) . microtime());
|
||||||
$result = array(
|
$result = array(
|
||||||
'success' => 0,
|
'success' => 0,
|
||||||
'gt' => $this->geetest_id,
|
'gt' => !empty($this->geetest_id) ? $this->geetest_id : 'e10adc3949ba59abbe56e057f20f883e',
|
||||||
'challenge' => $challenge,
|
'challenge' => $challenge,
|
||||||
'new_captcha'=>true
|
'new_captcha' => true
|
||||||
);
|
);
|
||||||
return $result;
|
return $result;
|
||||||
}
|
}
|
||||||
|
|
||||||
private function pre_process_demo($params) {
|
private function pre_process_demo($params)
|
||||||
|
{
|
||||||
$url = 'https://www.geetest.com/demo/gt/register-fullpage?t=' . time() . "123";
|
$url = 'https://www.geetest.com/demo/gt/register-fullpage?t=' . time() . "123";
|
||||||
$referer = 'https://www.geetest.com/demo/slide-popup.html';
|
$referer = 'https://www.geetest.com/demo/slide-popup.html';
|
||||||
$data = get_curl($url, 0, $referer);
|
$data = get_curl($url, 0, $referer);
|
||||||
$arr = json_decode($data, true);
|
if ($data) {
|
||||||
if($arr && isset($arr['challenge'])){
|
$arr = json_decode($data, true);
|
||||||
return $arr;
|
if (isset($arr['challenge'])) {
|
||||||
}else{
|
return $arr;
|
||||||
return $this->failback_process();
|
}
|
||||||
}
|
}
|
||||||
|
return $this->failback_process();
|
||||||
}
|
}
|
||||||
|
|
||||||
//正常流程下(即验证初始化成功),二次验证
|
//正常流程下(即验证初始化成功),二次验证
|
||||||
public function success_validate($challenge, $validate, $seccode, $params) {
|
public function success_validate($challenge, $validate, $seccode, $params)
|
||||||
if(!empty($this->geetest_id) && !empty($this->geetest_key)){
|
{
|
||||||
|
if (!empty($this->geetest_id) && !empty($this->geetest_key)) {
|
||||||
return $this->success_validate_api($challenge, $validate, $seccode, $params);
|
return $this->success_validate_api($challenge, $validate, $seccode, $params);
|
||||||
}else{
|
} else {
|
||||||
return $this->success_validate_demo($challenge, $validate, $seccode);
|
return $this->success_validate_demo($challenge, $validate, $seccode);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private function success_validate_api($challenge, $validate, $seccode, $params) {
|
private function success_validate_api($challenge, $validate, $seccode, $params)
|
||||||
|
{
|
||||||
if (!$this->check_validate($challenge, $validate)) {
|
if (!$this->check_validate($challenge, $validate)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@@ -101,15 +113,16 @@ class GeetestLib
|
|||||||
$url = 'http://api.geetest.com/validate.php';
|
$url = 'http://api.geetest.com/validate.php';
|
||||||
$res = get_curl($url, http_build_query($params));
|
$res = get_curl($url, http_build_query($params));
|
||||||
$arr = json_decode($res, true);
|
$arr = json_decode($res, true);
|
||||||
if($arr && isset($arr['seccode'])){
|
if ($arr && isset($arr['seccode'])) {
|
||||||
if($arr['seccode'] == md5($seccode)){
|
if ($arr['seccode'] == md5($seccode)) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
private function check_validate($challenge, $validate) {
|
private function check_validate($challenge, $validate)
|
||||||
|
{
|
||||||
if (strlen($validate) != 32) {
|
if (strlen($validate) != 32) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@@ -119,7 +132,8 @@ class GeetestLib
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
private function success_validate_demo($challenge, $validate, $seccode) {
|
private function success_validate_demo($challenge, $validate, $seccode)
|
||||||
|
{
|
||||||
$params = [
|
$params = [
|
||||||
'geetest_challenge' => $challenge,
|
'geetest_challenge' => $challenge,
|
||||||
'geetest_validate' => $validate,
|
'geetest_validate' => $validate,
|
||||||
@@ -128,19 +142,76 @@ class GeetestLib
|
|||||||
$url = 'https://www.geetest.com/demo/gt/validate-fullpage';
|
$url = 'https://www.geetest.com/demo/gt/validate-fullpage';
|
||||||
$referer = 'https://www.geetest.com/demo/slide-popup.html';
|
$referer = 'https://www.geetest.com/demo/slide-popup.html';
|
||||||
$data = get_curl($url, http_build_query($params), $referer);
|
$data = get_curl($url, http_build_query($params), $referer);
|
||||||
$arr = json_decode($data, true);
|
if ($data) {
|
||||||
if($arr && $arr['status'] == 'success'){
|
$arr = json_decode($data, true);
|
||||||
return true;
|
if (isset($arr['status']) && $arr['status'] == 'success') {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
//异常流程下(即验证初始化失败,宕机模式),二次验证
|
//异常流程下(即验证初始化失败,宕机模式),二次验证
|
||||||
public function fail_validate($challenge, $validate, $seccode) {
|
public function fail_validate($challenge, $validate, $seccode)
|
||||||
if(md5($challenge) == $validate){
|
{
|
||||||
|
if (md5($challenge) == $validate) {
|
||||||
return true;
|
return true;
|
||||||
}else{
|
} else {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
public function gt4_validate($captcha_id, $lot_number, $pass_token, $gen_time, $captcha_output)
|
||||||
|
{
|
||||||
|
if (!empty($this->geetest_id) && !empty($this->geetest_key)) {
|
||||||
|
return $this->gt4_validate_api($captcha_id, $lot_number, $pass_token, $gen_time, $captcha_output);
|
||||||
|
} else {
|
||||||
|
return $this->gt4_validate_demo($captcha_id, $lot_number, $pass_token, $gen_time, $captcha_output);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private function gt4_validate_api($captcha_id, $lot_number, $pass_token, $gen_time, $captcha_output)
|
||||||
|
{
|
||||||
|
$url = 'http://gcaptcha4.geetest.com/validate?captcha_id=' . $captcha_id;
|
||||||
|
$param = [
|
||||||
|
'lot_number' => $lot_number,
|
||||||
|
'pass_token' => $pass_token,
|
||||||
|
'gen_time' => $gen_time,
|
||||||
|
'captcha_output' => $captcha_output
|
||||||
|
];
|
||||||
|
$param['sign_token'] = hash_hmac('sha256', $param['lot_number'], $this->geetest_key);
|
||||||
|
$data = get_curl($url, http_build_query($param));
|
||||||
|
if ($data) {
|
||||||
|
$arr = json_decode($data, true);
|
||||||
|
if (isset($arr['status']) && $arr['status'] == 'success') {
|
||||||
|
if (isset($arr['result']) && $arr['result'] == 'success') {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
private function gt4_validate_demo($captcha_id, $lot_number, $pass_token, $gen_time, $captcha_output)
|
||||||
|
{
|
||||||
|
$url = 'http://gt4.geetest.com/demov4/demo/login';
|
||||||
|
$param = [
|
||||||
|
'captcha_id' => $captcha_id,
|
||||||
|
'lot_number' => $lot_number,
|
||||||
|
'pass_token' => $pass_token,
|
||||||
|
'gen_time' => $gen_time,
|
||||||
|
'captcha_output' => $captcha_output
|
||||||
|
];
|
||||||
|
$referer = 'http://gt4.geetest.com/demov4/invisible-bind-zh.html';
|
||||||
|
$httpheader[] = "X-Real-IP: " . request()->clientip;
|
||||||
|
$httpheader[] = "X-Forwarded-For: " . request()->clientip;
|
||||||
|
$data = get_curl($url . '?' . http_build_query($param), 0, $referer, 0, 0, 0, 0, $httpheader);
|
||||||
|
if ($data) {
|
||||||
|
$arr = json_decode($data, true);
|
||||||
|
if (isset($arr['result']) && $arr['result'] == 'success') {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ class AuthAdmin
|
|||||||
$islogin = false;
|
$islogin = false;
|
||||||
$cookie = cookie('admin_token');
|
$cookie = cookie('admin_token');
|
||||||
if($cookie){
|
if($cookie){
|
||||||
$token=authcode($cookie, 'DECODE', config_get('syskey'));
|
$token=authcode($cookie, 'DECODE', config_get('syskey', ''));
|
||||||
if($token){
|
if($token){
|
||||||
list($user, $sid, $expiretime) = explode("\t", $token);
|
list($user, $sid, $expiretime) = explode("\t", $token);
|
||||||
$session=md5(config_get('admin_username').config_get('admin_password'));
|
$session=md5(config_get('admin_username').config_get('admin_password'));
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ class AuthUser
|
|||||||
$cookie = cookie('user_token');
|
$cookie = cookie('user_token');
|
||||||
$user = null;
|
$user = null;
|
||||||
if($cookie){
|
if($cookie){
|
||||||
$token=authcode($cookie, 'DECODE', config_get('syskey'));
|
$token=authcode($cookie, 'DECODE', config_get('syskey', ''));
|
||||||
if($token){
|
if($token){
|
||||||
list($uid, $sid, $expiretime) = explode("\t", $token);
|
list($uid, $sid, $expiretime) = explode("\t", $token);
|
||||||
$user = Db::name('user')->where('id', $uid)->find();
|
$user = Db::name('user')->where('id', $uid)->find();
|
||||||
|
|||||||
@@ -5,6 +5,8 @@ namespace app\middleware;
|
|||||||
|
|
||||||
use think\facade\Db;
|
use think\facade\Db;
|
||||||
use think\facade\Config;
|
use think\facade\Config;
|
||||||
|
use think\facade\Cache;
|
||||||
|
use think\helper\Str;
|
||||||
|
|
||||||
class LoadConfig
|
class LoadConfig
|
||||||
{
|
{
|
||||||
@@ -22,6 +24,12 @@ class LoadConfig
|
|||||||
}
|
}
|
||||||
|
|
||||||
$res = Db::name('config')->cache('configs',0)->column('value','key');
|
$res = Db::name('config')->cache('configs',0)->column('value','key');
|
||||||
|
if (empty($res['syskey'])) {
|
||||||
|
$syskey = Str::random(16);
|
||||||
|
config_set('syskey', $syskey);
|
||||||
|
Cache::delete('configs');
|
||||||
|
$res['syskey'] = $syskey;
|
||||||
|
}
|
||||||
Config::set($res, 'sys');
|
Config::set($res, 'sys');
|
||||||
|
|
||||||
return $next($request);
|
return $next($request);
|
||||||
|
|||||||
+12
-7
@@ -9,22 +9,27 @@
|
|||||||
"homepage": "http://tool.cccyun.cc/",
|
"homepage": "http://tool.cccyun.cc/",
|
||||||
"license": "GPL-3.0-only",
|
"license": "GPL-3.0-only",
|
||||||
"require": {
|
"require": {
|
||||||
"php": ">=7.3.5",
|
"php": ">=8.2.0",
|
||||||
"topthink/framework": "^6.0.0",
|
"topthink/framework": "^8.1.0",
|
||||||
"topthink/think-orm": "^2.0",
|
"topthink/think-orm": "^3.0|^4.0",
|
||||||
"topthink/think-view": "^1.0",
|
"topthink/think-filesystem": "^2.0|^3.0",
|
||||||
|
"topthink/think-view": "^2.0",
|
||||||
"topthink/think-migration": "^3.0",
|
"topthink/think-migration": "^3.0",
|
||||||
"cccyun/think-captcha": "^3.0",
|
"cccyun/think-captcha": "^3.0",
|
||||||
"ext-curl": "*",
|
"ext-curl": "*",
|
||||||
|
"ext-gd": "*",
|
||||||
|
"ext-mbstring": "*",
|
||||||
|
"ext-openssl": "*",
|
||||||
"ext-json": "*",
|
"ext-json": "*",
|
||||||
"ext-zip": "*",
|
"ext-zip": "*",
|
||||||
"ext-pdo": "*",
|
"ext-pdo": "*",
|
||||||
"ext-iconv": "*",
|
"ext-iconv": "*",
|
||||||
"khanamiryan/qrcode-detector-decoder": "1.0.5.2"
|
"cccyun/php-whois": "^1.2",
|
||||||
|
"khanamiryan/qrcode-detector-decoder": "^2.0"
|
||||||
},
|
},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
"symfony/var-dumper": "^4.2",
|
"topthink/think-dumper": "^1.0",
|
||||||
"topthink/think-trace": "^1.0"
|
"topthink/think-trace": "^2.0"
|
||||||
},
|
},
|
||||||
"autoload": {
|
"autoload": {
|
||||||
"psr-4": {
|
"psr-4": {
|
||||||
|
|||||||
Generated
+1559
@@ -0,0 +1,1559 @@
|
|||||||
|
{
|
||||||
|
"_readme": [
|
||||||
|
"This file locks the dependencies of your project to a known state",
|
||||||
|
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
||||||
|
"This file is @generated automatically"
|
||||||
|
],
|
||||||
|
"content-hash": "2460d31b05b74ff525434e1be3eff065",
|
||||||
|
"packages": [
|
||||||
|
{
|
||||||
|
"name": "cccyun/php-whois",
|
||||||
|
"version": "1.3",
|
||||||
|
"source": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/netcccyun/php-whois.git",
|
||||||
|
"reference": "f02627ba0bef005aa9e336d63541f9fd288675b5"
|
||||||
|
},
|
||||||
|
"dist": {
|
||||||
|
"type": "zip",
|
||||||
|
"url": "https://api.github.com/repos/netcccyun/php-whois/zipball/f02627ba0bef005aa9e336d63541f9fd288675b5",
|
||||||
|
"reference": "f02627ba0bef005aa9e336d63541f9fd288675b5",
|
||||||
|
"shasum": ""
|
||||||
|
},
|
||||||
|
"require": {
|
||||||
|
"ext-curl": "*",
|
||||||
|
"ext-json": "*",
|
||||||
|
"ext-mbstring": "*",
|
||||||
|
"php": ">=7.2",
|
||||||
|
"symfony/polyfill-intl-idn": "^1.27"
|
||||||
|
},
|
||||||
|
"require-dev": {
|
||||||
|
"phpunit/phpunit": "^8.0"
|
||||||
|
},
|
||||||
|
"type": "library",
|
||||||
|
"autoload": {
|
||||||
|
"psr-4": {
|
||||||
|
"Iodev\\": "src/Iodev/"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"notification-url": "https://packagist.org/downloads/",
|
||||||
|
"license": [
|
||||||
|
"MIT"
|
||||||
|
],
|
||||||
|
"authors": [
|
||||||
|
{
|
||||||
|
"name": "caihong",
|
||||||
|
"email": "[email protected]"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"description": "PHP WHOIS provides parsed and raw whois lookup of domains and ASN routes. PHP 5.4+ and 7+ compatible ",
|
||||||
|
"homepage": "https://github.com/netcccyun/php-whois",
|
||||||
|
"keywords": [
|
||||||
|
"asn",
|
||||||
|
"domain",
|
||||||
|
"info",
|
||||||
|
"lookup",
|
||||||
|
"parser",
|
||||||
|
"php",
|
||||||
|
"query",
|
||||||
|
"routes",
|
||||||
|
"tld",
|
||||||
|
"whois",
|
||||||
|
"црщшы"
|
||||||
|
],
|
||||||
|
"support": {
|
||||||
|
"source": "https://github.com/netcccyun/php-whois/tree/1.3"
|
||||||
|
},
|
||||||
|
"time": "2026-02-12T05:56:18+00:00"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "cccyun/think-captcha",
|
||||||
|
"version": "3.0.12",
|
||||||
|
"source": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/netcccyun/think-captcha.git",
|
||||||
|
"reference": "e20974d9f86a7e3039ead56a66995c396109a757"
|
||||||
|
},
|
||||||
|
"dist": {
|
||||||
|
"type": "zip",
|
||||||
|
"url": "https://api.github.com/repos/netcccyun/think-captcha/zipball/e20974d9f86a7e3039ead56a66995c396109a757",
|
||||||
|
"reference": "e20974d9f86a7e3039ead56a66995c396109a757",
|
||||||
|
"shasum": ""
|
||||||
|
},
|
||||||
|
"require": {
|
||||||
|
"topthink/framework": "^6.0|^8.0"
|
||||||
|
},
|
||||||
|
"type": "library",
|
||||||
|
"extra": {
|
||||||
|
"think": {
|
||||||
|
"config": {
|
||||||
|
"captcha": "src/config.php"
|
||||||
|
},
|
||||||
|
"services": [
|
||||||
|
"think\\captcha\\CaptchaService"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"autoload": {
|
||||||
|
"files": [
|
||||||
|
"src/helper.php"
|
||||||
|
],
|
||||||
|
"psr-4": {
|
||||||
|
"think\\captcha\\": "src/"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"notification-url": "https://packagist.org/downloads/",
|
||||||
|
"license": [
|
||||||
|
"Apache-2.0"
|
||||||
|
],
|
||||||
|
"authors": [
|
||||||
|
{
|
||||||
|
"name": "yunwuxin",
|
||||||
|
"email": "[email protected]"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"description": "captcha package for thinkphp",
|
||||||
|
"support": {
|
||||||
|
"source": "https://github.com/netcccyun/think-captcha/tree/3.0.12"
|
||||||
|
},
|
||||||
|
"time": "2026-06-23T15:30:22+00:00"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "khanamiryan/qrcode-detector-decoder",
|
||||||
|
"version": "2.0.3",
|
||||||
|
"source": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/khanamiryan/php-qrcode-detector-decoder.git",
|
||||||
|
"reference": "17c570bb39f641cc1c4c41a46177ac491393a01d"
|
||||||
|
},
|
||||||
|
"dist": {
|
||||||
|
"type": "zip",
|
||||||
|
"url": "https://api.github.com/repos/khanamiryan/php-qrcode-detector-decoder/zipball/17c570bb39f641cc1c4c41a46177ac491393a01d",
|
||||||
|
"reference": "17c570bb39f641cc1c4c41a46177ac491393a01d",
|
||||||
|
"shasum": ""
|
||||||
|
},
|
||||||
|
"require": {
|
||||||
|
"php": ">=8.1"
|
||||||
|
},
|
||||||
|
"require-dev": {
|
||||||
|
"phpunit/phpunit": "^7.5 | ^8.0 | ^9.0",
|
||||||
|
"rector/rector": "^1.0.4",
|
||||||
|
"symplify/easy-coding-standard": "^11.0",
|
||||||
|
"vimeo/psalm": "^4.24"
|
||||||
|
},
|
||||||
|
"type": "library",
|
||||||
|
"autoload": {
|
||||||
|
"files": [
|
||||||
|
"lib/Common/customFunctions.php"
|
||||||
|
],
|
||||||
|
"psr-4": {
|
||||||
|
"Zxing\\": "lib/"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"notification-url": "https://packagist.org/downloads/",
|
||||||
|
"license": [
|
||||||
|
"MIT",
|
||||||
|
"Apache-2.0"
|
||||||
|
],
|
||||||
|
"authors": [
|
||||||
|
{
|
||||||
|
"name": "Ashot Khanamiryan",
|
||||||
|
"email": "[email protected]",
|
||||||
|
"homepage": "https://github.com/khanamiryan",
|
||||||
|
"role": "Developer"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"description": "QR code decoder / reader",
|
||||||
|
"homepage": "https://github.com/khanamiryan/php-qrcode-detector-decoder/",
|
||||||
|
"keywords": [
|
||||||
|
"barcode",
|
||||||
|
"qr",
|
||||||
|
"zxing"
|
||||||
|
],
|
||||||
|
"support": {
|
||||||
|
"issues": "https://github.com/khanamiryan/php-qrcode-detector-decoder/issues",
|
||||||
|
"source": "https://github.com/khanamiryan/php-qrcode-detector-decoder/tree/2.0.3"
|
||||||
|
},
|
||||||
|
"time": "2025-06-10T08:44:02+00:00"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "league/flysystem",
|
||||||
|
"version": "3.35.2",
|
||||||
|
"source": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/thephpleague/flysystem.git",
|
||||||
|
"reference": "b277b5dc3d56650b68904117124e79c851e12376"
|
||||||
|
},
|
||||||
|
"dist": {
|
||||||
|
"type": "zip",
|
||||||
|
"url": "https://api.github.com/repos/thephpleague/flysystem/zipball/b277b5dc3d56650b68904117124e79c851e12376",
|
||||||
|
"reference": "b277b5dc3d56650b68904117124e79c851e12376",
|
||||||
|
"shasum": ""
|
||||||
|
},
|
||||||
|
"require": {
|
||||||
|
"league/flysystem-local": "^3.0.0",
|
||||||
|
"league/mime-type-detection": "^1.0.0",
|
||||||
|
"php": "^8.0.2"
|
||||||
|
},
|
||||||
|
"conflict": {
|
||||||
|
"async-aws/core": "<1.19.0",
|
||||||
|
"async-aws/s3": "<1.14.0",
|
||||||
|
"aws/aws-sdk-php": "3.209.31 || 3.210.0",
|
||||||
|
"guzzlehttp/guzzle": "<7.0",
|
||||||
|
"guzzlehttp/ringphp": "<1.1.1",
|
||||||
|
"phpseclib/phpseclib": "3.0.15",
|
||||||
|
"symfony/http-client": "<5.2"
|
||||||
|
},
|
||||||
|
"require-dev": {
|
||||||
|
"async-aws/s3": "^1.5 || ^2.0",
|
||||||
|
"async-aws/simple-s3": "^1.1 || ^2.0",
|
||||||
|
"aws/aws-sdk-php": "^3.295.10",
|
||||||
|
"composer/semver": "^3.0",
|
||||||
|
"ext-fileinfo": "*",
|
||||||
|
"ext-ftp": "*",
|
||||||
|
"ext-mongodb": "^1.3|^2",
|
||||||
|
"ext-zip": "*",
|
||||||
|
"friendsofphp/php-cs-fixer": "^3.5",
|
||||||
|
"google/cloud-storage": "^1.23",
|
||||||
|
"guzzlehttp/psr7": "^2.6",
|
||||||
|
"microsoft/azure-storage-blob": "^1.1",
|
||||||
|
"mongodb/mongodb": "^1.2|^2",
|
||||||
|
"phpseclib/phpseclib": "^3.0.36",
|
||||||
|
"phpstan/phpstan": "^1.10",
|
||||||
|
"phpunit/phpunit": "^9.5.11|^10.0",
|
||||||
|
"sabre/dav": "^4.6.0"
|
||||||
|
},
|
||||||
|
"type": "library",
|
||||||
|
"autoload": {
|
||||||
|
"psr-4": {
|
||||||
|
"League\\Flysystem\\": "src"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"notification-url": "https://packagist.org/downloads/",
|
||||||
|
"license": [
|
||||||
|
"MIT"
|
||||||
|
],
|
||||||
|
"authors": [
|
||||||
|
{
|
||||||
|
"name": "Frank de Jonge",
|
||||||
|
"email": "[email protected]"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"description": "File storage abstraction for PHP",
|
||||||
|
"keywords": [
|
||||||
|
"WebDAV",
|
||||||
|
"aws",
|
||||||
|
"cloud",
|
||||||
|
"file",
|
||||||
|
"files",
|
||||||
|
"filesystem",
|
||||||
|
"filesystems",
|
||||||
|
"ftp",
|
||||||
|
"s3",
|
||||||
|
"sftp",
|
||||||
|
"storage"
|
||||||
|
],
|
||||||
|
"support": {
|
||||||
|
"issues": "https://github.com/thephpleague/flysystem/issues",
|
||||||
|
"source": "https://github.com/thephpleague/flysystem/tree/3.35.2"
|
||||||
|
},
|
||||||
|
"time": "2026-07-06T14:42:07+00:00"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "league/flysystem-local",
|
||||||
|
"version": "3.31.0",
|
||||||
|
"source": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/thephpleague/flysystem-local.git",
|
||||||
|
"reference": "2f669db18a4c20c755c2bb7d3a7b0b2340488079"
|
||||||
|
},
|
||||||
|
"dist": {
|
||||||
|
"type": "zip",
|
||||||
|
"url": "https://api.github.com/repos/thephpleague/flysystem-local/zipball/2f669db18a4c20c755c2bb7d3a7b0b2340488079",
|
||||||
|
"reference": "2f669db18a4c20c755c2bb7d3a7b0b2340488079",
|
||||||
|
"shasum": ""
|
||||||
|
},
|
||||||
|
"require": {
|
||||||
|
"ext-fileinfo": "*",
|
||||||
|
"league/flysystem": "^3.0.0",
|
||||||
|
"league/mime-type-detection": "^1.0.0",
|
||||||
|
"php": "^8.0.2"
|
||||||
|
},
|
||||||
|
"type": "library",
|
||||||
|
"autoload": {
|
||||||
|
"psr-4": {
|
||||||
|
"League\\Flysystem\\Local\\": ""
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"notification-url": "https://packagist.org/downloads/",
|
||||||
|
"license": [
|
||||||
|
"MIT"
|
||||||
|
],
|
||||||
|
"authors": [
|
||||||
|
{
|
||||||
|
"name": "Frank de Jonge",
|
||||||
|
"email": "[email protected]"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"description": "Local filesystem adapter for Flysystem.",
|
||||||
|
"keywords": [
|
||||||
|
"Flysystem",
|
||||||
|
"file",
|
||||||
|
"files",
|
||||||
|
"filesystem",
|
||||||
|
"local"
|
||||||
|
],
|
||||||
|
"support": {
|
||||||
|
"source": "https://github.com/thephpleague/flysystem-local/tree/3.31.0"
|
||||||
|
},
|
||||||
|
"time": "2026-01-23T15:30:45+00:00"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "league/mime-type-detection",
|
||||||
|
"version": "1.17.0",
|
||||||
|
"source": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/thephpleague/mime-type-detection.git",
|
||||||
|
"reference": "f5f47eff7c48ed1003069a2ca67f316fb4021c76"
|
||||||
|
},
|
||||||
|
"dist": {
|
||||||
|
"type": "zip",
|
||||||
|
"url": "https://api.github.com/repos/thephpleague/mime-type-detection/zipball/f5f47eff7c48ed1003069a2ca67f316fb4021c76",
|
||||||
|
"reference": "f5f47eff7c48ed1003069a2ca67f316fb4021c76",
|
||||||
|
"shasum": ""
|
||||||
|
},
|
||||||
|
"require": {
|
||||||
|
"ext-fileinfo": "*",
|
||||||
|
"php": "^7.4 || ^8.0"
|
||||||
|
},
|
||||||
|
"require-dev": {
|
||||||
|
"friendsofphp/php-cs-fixer": "^3.2",
|
||||||
|
"phpstan/phpstan": "^0.12.68",
|
||||||
|
"phpunit/phpunit": "^8.5.8 || ^9.3 || ^10.0 || ^11.0 || ^12.0"
|
||||||
|
},
|
||||||
|
"type": "library",
|
||||||
|
"autoload": {
|
||||||
|
"psr-4": {
|
||||||
|
"League\\MimeTypeDetection\\": "src"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"notification-url": "https://packagist.org/downloads/",
|
||||||
|
"license": [
|
||||||
|
"MIT"
|
||||||
|
],
|
||||||
|
"authors": [
|
||||||
|
{
|
||||||
|
"name": "Frank de Jonge",
|
||||||
|
"email": "[email protected]"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"description": "Mime-type detection for Flysystem",
|
||||||
|
"support": {
|
||||||
|
"issues": "https://github.com/thephpleague/mime-type-detection/issues",
|
||||||
|
"source": "https://github.com/thephpleague/mime-type-detection/tree/1.17.0"
|
||||||
|
},
|
||||||
|
"funding": [
|
||||||
|
{
|
||||||
|
"url": "https://github.com/frankdejonge",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"url": "https://tidelift.com/funding/github/packagist/league/flysystem",
|
||||||
|
"type": "tidelift"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"time": "2026-07-09T11:49:27+00:00"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "psr/container",
|
||||||
|
"version": "2.0.2",
|
||||||
|
"source": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/php-fig/container.git",
|
||||||
|
"reference": "c71ecc56dfe541dbd90c5360474fbc405f8d5963"
|
||||||
|
},
|
||||||
|
"dist": {
|
||||||
|
"type": "zip",
|
||||||
|
"url": "https://api.github.com/repos/php-fig/container/zipball/c71ecc56dfe541dbd90c5360474fbc405f8d5963",
|
||||||
|
"reference": "c71ecc56dfe541dbd90c5360474fbc405f8d5963",
|
||||||
|
"shasum": ""
|
||||||
|
},
|
||||||
|
"require": {
|
||||||
|
"php": ">=7.4.0"
|
||||||
|
},
|
||||||
|
"type": "library",
|
||||||
|
"extra": {
|
||||||
|
"branch-alias": {
|
||||||
|
"dev-master": "2.0.x-dev"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"autoload": {
|
||||||
|
"psr-4": {
|
||||||
|
"Psr\\Container\\": "src/"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"notification-url": "https://packagist.org/downloads/",
|
||||||
|
"license": [
|
||||||
|
"MIT"
|
||||||
|
],
|
||||||
|
"authors": [
|
||||||
|
{
|
||||||
|
"name": "PHP-FIG",
|
||||||
|
"homepage": "https://www.php-fig.org/"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"description": "Common Container Interface (PHP FIG PSR-11)",
|
||||||
|
"homepage": "https://github.com/php-fig/container",
|
||||||
|
"keywords": [
|
||||||
|
"PSR-11",
|
||||||
|
"container",
|
||||||
|
"container-interface",
|
||||||
|
"container-interop",
|
||||||
|
"psr"
|
||||||
|
],
|
||||||
|
"support": {
|
||||||
|
"issues": "https://github.com/php-fig/container/issues",
|
||||||
|
"source": "https://github.com/php-fig/container/tree/2.0.2"
|
||||||
|
},
|
||||||
|
"time": "2021-11-05T16:47:00+00:00"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "psr/http-message",
|
||||||
|
"version": "2.0",
|
||||||
|
"source": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/php-fig/http-message.git",
|
||||||
|
"reference": "402d35bcb92c70c026d1a6a9883f06b2ead23d71"
|
||||||
|
},
|
||||||
|
"dist": {
|
||||||
|
"type": "zip",
|
||||||
|
"url": "https://api.github.com/repos/php-fig/http-message/zipball/402d35bcb92c70c026d1a6a9883f06b2ead23d71",
|
||||||
|
"reference": "402d35bcb92c70c026d1a6a9883f06b2ead23d71",
|
||||||
|
"shasum": ""
|
||||||
|
},
|
||||||
|
"require": {
|
||||||
|
"php": "^7.2 || ^8.0"
|
||||||
|
},
|
||||||
|
"type": "library",
|
||||||
|
"extra": {
|
||||||
|
"branch-alias": {
|
||||||
|
"dev-master": "2.0.x-dev"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"autoload": {
|
||||||
|
"psr-4": {
|
||||||
|
"Psr\\Http\\Message\\": "src/"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"notification-url": "https://packagist.org/downloads/",
|
||||||
|
"license": [
|
||||||
|
"MIT"
|
||||||
|
],
|
||||||
|
"authors": [
|
||||||
|
{
|
||||||
|
"name": "PHP-FIG",
|
||||||
|
"homepage": "https://www.php-fig.org/"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"description": "Common interface for HTTP messages",
|
||||||
|
"homepage": "https://github.com/php-fig/http-message",
|
||||||
|
"keywords": [
|
||||||
|
"http",
|
||||||
|
"http-message",
|
||||||
|
"psr",
|
||||||
|
"psr-7",
|
||||||
|
"request",
|
||||||
|
"response"
|
||||||
|
],
|
||||||
|
"support": {
|
||||||
|
"source": "https://github.com/php-fig/http-message/tree/2.0"
|
||||||
|
},
|
||||||
|
"time": "2023-04-04T09:54:51+00:00"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "psr/log",
|
||||||
|
"version": "3.0.2",
|
||||||
|
"source": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/php-fig/log.git",
|
||||||
|
"reference": "f16e1d5863e37f8d8c2a01719f5b34baa2b714d3"
|
||||||
|
},
|
||||||
|
"dist": {
|
||||||
|
"type": "zip",
|
||||||
|
"url": "https://api.github.com/repos/php-fig/log/zipball/f16e1d5863e37f8d8c2a01719f5b34baa2b714d3",
|
||||||
|
"reference": "f16e1d5863e37f8d8c2a01719f5b34baa2b714d3",
|
||||||
|
"shasum": ""
|
||||||
|
},
|
||||||
|
"require": {
|
||||||
|
"php": ">=8.0.0"
|
||||||
|
},
|
||||||
|
"type": "library",
|
||||||
|
"extra": {
|
||||||
|
"branch-alias": {
|
||||||
|
"dev-master": "3.x-dev"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"autoload": {
|
||||||
|
"psr-4": {
|
||||||
|
"Psr\\Log\\": "src"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"notification-url": "https://packagist.org/downloads/",
|
||||||
|
"license": [
|
||||||
|
"MIT"
|
||||||
|
],
|
||||||
|
"authors": [
|
||||||
|
{
|
||||||
|
"name": "PHP-FIG",
|
||||||
|
"homepage": "https://www.php-fig.org/"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"description": "Common interface for logging libraries",
|
||||||
|
"homepage": "https://github.com/php-fig/log",
|
||||||
|
"keywords": [
|
||||||
|
"log",
|
||||||
|
"psr",
|
||||||
|
"psr-3"
|
||||||
|
],
|
||||||
|
"support": {
|
||||||
|
"source": "https://github.com/php-fig/log/tree/3.0.2"
|
||||||
|
},
|
||||||
|
"time": "2024-09-11T13:17:53+00:00"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "psr/simple-cache",
|
||||||
|
"version": "3.0.0",
|
||||||
|
"source": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/php-fig/simple-cache.git",
|
||||||
|
"reference": "764e0b3939f5ca87cb904f570ef9be2d78a07865"
|
||||||
|
},
|
||||||
|
"dist": {
|
||||||
|
"type": "zip",
|
||||||
|
"url": "https://api.github.com/repos/php-fig/simple-cache/zipball/764e0b3939f5ca87cb904f570ef9be2d78a07865",
|
||||||
|
"reference": "764e0b3939f5ca87cb904f570ef9be2d78a07865",
|
||||||
|
"shasum": ""
|
||||||
|
},
|
||||||
|
"require": {
|
||||||
|
"php": ">=8.0.0"
|
||||||
|
},
|
||||||
|
"type": "library",
|
||||||
|
"extra": {
|
||||||
|
"branch-alias": {
|
||||||
|
"dev-master": "3.0.x-dev"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"autoload": {
|
||||||
|
"psr-4": {
|
||||||
|
"Psr\\SimpleCache\\": "src/"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"notification-url": "https://packagist.org/downloads/",
|
||||||
|
"license": [
|
||||||
|
"MIT"
|
||||||
|
],
|
||||||
|
"authors": [
|
||||||
|
{
|
||||||
|
"name": "PHP-FIG",
|
||||||
|
"homepage": "https://www.php-fig.org/"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"description": "Common interfaces for simple caching",
|
||||||
|
"keywords": [
|
||||||
|
"cache",
|
||||||
|
"caching",
|
||||||
|
"psr",
|
||||||
|
"psr-16",
|
||||||
|
"simple-cache"
|
||||||
|
],
|
||||||
|
"support": {
|
||||||
|
"source": "https://github.com/php-fig/simple-cache/tree/3.0.0"
|
||||||
|
},
|
||||||
|
"time": "2021-10-29T13:26:27+00:00"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "symfony/polyfill-intl-idn",
|
||||||
|
"version": "v1.38.1",
|
||||||
|
"source": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/symfony/polyfill-intl-idn.git",
|
||||||
|
"reference": "dc21118016c039a66235cf93d96b435ffb282412"
|
||||||
|
},
|
||||||
|
"dist": {
|
||||||
|
"type": "zip",
|
||||||
|
"url": "https://api.github.com/repos/symfony/polyfill-intl-idn/zipball/dc21118016c039a66235cf93d96b435ffb282412",
|
||||||
|
"reference": "dc21118016c039a66235cf93d96b435ffb282412",
|
||||||
|
"shasum": ""
|
||||||
|
},
|
||||||
|
"require": {
|
||||||
|
"php": ">=7.2",
|
||||||
|
"symfony/polyfill-intl-normalizer": "^1.10"
|
||||||
|
},
|
||||||
|
"suggest": {
|
||||||
|
"ext-intl": "For best performance"
|
||||||
|
},
|
||||||
|
"type": "library",
|
||||||
|
"extra": {
|
||||||
|
"thanks": {
|
||||||
|
"url": "https://github.com/symfony/polyfill",
|
||||||
|
"name": "symfony/polyfill"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"autoload": {
|
||||||
|
"files": [
|
||||||
|
"bootstrap.php"
|
||||||
|
],
|
||||||
|
"psr-4": {
|
||||||
|
"Symfony\\Polyfill\\Intl\\Idn\\": ""
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"notification-url": "https://packagist.org/downloads/",
|
||||||
|
"license": [
|
||||||
|
"MIT"
|
||||||
|
],
|
||||||
|
"authors": [
|
||||||
|
{
|
||||||
|
"name": "Laurent Bassin",
|
||||||
|
"email": "[email protected]"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Trevor Rowbotham",
|
||||||
|
"email": "[email protected]"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Symfony Community",
|
||||||
|
"homepage": "https://symfony.com/contributors"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"description": "Symfony polyfill for intl's idn_to_ascii and idn_to_utf8 functions",
|
||||||
|
"homepage": "https://symfony.com",
|
||||||
|
"keywords": [
|
||||||
|
"compatibility",
|
||||||
|
"idn",
|
||||||
|
"intl",
|
||||||
|
"polyfill",
|
||||||
|
"portable",
|
||||||
|
"shim"
|
||||||
|
],
|
||||||
|
"support": {
|
||||||
|
"source": "https://github.com/symfony/polyfill-intl-idn/tree/v1.38.1"
|
||||||
|
},
|
||||||
|
"funding": [
|
||||||
|
{
|
||||||
|
"url": "https://symfony.com/sponsor",
|
||||||
|
"type": "custom"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"url": "https://github.com/fabpot",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"url": "https://github.com/nicolas-grekas",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
|
||||||
|
"type": "tidelift"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"time": "2026-05-25T15:22:23+00:00"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "symfony/polyfill-intl-normalizer",
|
||||||
|
"version": "v1.38.0",
|
||||||
|
"source": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/symfony/polyfill-intl-normalizer.git",
|
||||||
|
"reference": "2d446c214bdbe5b71bde5011b060a05fece3ae6b"
|
||||||
|
},
|
||||||
|
"dist": {
|
||||||
|
"type": "zip",
|
||||||
|
"url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/2d446c214bdbe5b71bde5011b060a05fece3ae6b",
|
||||||
|
"reference": "2d446c214bdbe5b71bde5011b060a05fece3ae6b",
|
||||||
|
"shasum": ""
|
||||||
|
},
|
||||||
|
"require": {
|
||||||
|
"php": ">=7.2"
|
||||||
|
},
|
||||||
|
"suggest": {
|
||||||
|
"ext-intl": "For best performance"
|
||||||
|
},
|
||||||
|
"type": "library",
|
||||||
|
"extra": {
|
||||||
|
"thanks": {
|
||||||
|
"url": "https://github.com/symfony/polyfill",
|
||||||
|
"name": "symfony/polyfill"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"autoload": {
|
||||||
|
"files": [
|
||||||
|
"bootstrap.php"
|
||||||
|
],
|
||||||
|
"psr-4": {
|
||||||
|
"Symfony\\Polyfill\\Intl\\Normalizer\\": ""
|
||||||
|
},
|
||||||
|
"classmap": [
|
||||||
|
"Resources/stubs"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"notification-url": "https://packagist.org/downloads/",
|
||||||
|
"license": [
|
||||||
|
"MIT"
|
||||||
|
],
|
||||||
|
"authors": [
|
||||||
|
{
|
||||||
|
"name": "Nicolas Grekas",
|
||||||
|
"email": "[email protected]"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Symfony Community",
|
||||||
|
"homepage": "https://symfony.com/contributors"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"description": "Symfony polyfill for intl's Normalizer class and related functions",
|
||||||
|
"homepage": "https://symfony.com",
|
||||||
|
"keywords": [
|
||||||
|
"compatibility",
|
||||||
|
"intl",
|
||||||
|
"normalizer",
|
||||||
|
"polyfill",
|
||||||
|
"portable",
|
||||||
|
"shim"
|
||||||
|
],
|
||||||
|
"support": {
|
||||||
|
"source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.38.0"
|
||||||
|
},
|
||||||
|
"funding": [
|
||||||
|
{
|
||||||
|
"url": "https://symfony.com/sponsor",
|
||||||
|
"type": "custom"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"url": "https://github.com/fabpot",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"url": "https://github.com/nicolas-grekas",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
|
||||||
|
"type": "tidelift"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"time": "2026-05-25T13:48:31+00:00"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "topthink/framework",
|
||||||
|
"version": "v8.1.4",
|
||||||
|
"source": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/top-think/framework.git",
|
||||||
|
"reference": "8e7b2b2364047cbf71a38c4e397a9ca0d4ef2b01"
|
||||||
|
},
|
||||||
|
"dist": {
|
||||||
|
"type": "zip",
|
||||||
|
"url": "https://api.github.com/repos/top-think/framework/zipball/8e7b2b2364047cbf71a38c4e397a9ca0d4ef2b01",
|
||||||
|
"reference": "8e7b2b2364047cbf71a38c4e397a9ca0d4ef2b01",
|
||||||
|
"shasum": ""
|
||||||
|
},
|
||||||
|
"require": {
|
||||||
|
"ext-ctype": "*",
|
||||||
|
"ext-json": "*",
|
||||||
|
"ext-mbstring": "*",
|
||||||
|
"php": ">=8.0.0",
|
||||||
|
"psr/http-message": "^1.0|^2.0",
|
||||||
|
"psr/log": "^1.0|^2.0|^3.0",
|
||||||
|
"psr/simple-cache": "^1.0|^2.0|^3.0",
|
||||||
|
"topthink/think-container": "^3.0",
|
||||||
|
"topthink/think-helper": "^3.1",
|
||||||
|
"topthink/think-orm": "^3.0|^4.0",
|
||||||
|
"topthink/think-validate": "^3.0"
|
||||||
|
},
|
||||||
|
"require-dev": {
|
||||||
|
"friendsofphp/php-cs-fixer": "^3.92",
|
||||||
|
"guzzlehttp/psr7": "^2.1.0",
|
||||||
|
"mikey179/vfsstream": "^1.6",
|
||||||
|
"mockery/mockery": "^1.2",
|
||||||
|
"phpunit/phpunit": "^9.5"
|
||||||
|
},
|
||||||
|
"type": "library",
|
||||||
|
"autoload": {
|
||||||
|
"files": [],
|
||||||
|
"psr-4": {
|
||||||
|
"think\\": "src/think/"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"notification-url": "https://packagist.org/downloads/",
|
||||||
|
"license": [
|
||||||
|
"Apache-2.0"
|
||||||
|
],
|
||||||
|
"authors": [
|
||||||
|
{
|
||||||
|
"name": "liu21st",
|
||||||
|
"email": "[email protected]"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "yunwuxin",
|
||||||
|
"email": "[email protected]"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"description": "The ThinkPHP Framework.",
|
||||||
|
"homepage": "http://thinkphp.cn/",
|
||||||
|
"keywords": [
|
||||||
|
"framework",
|
||||||
|
"orm",
|
||||||
|
"thinkphp"
|
||||||
|
],
|
||||||
|
"support": {
|
||||||
|
"issues": "https://github.com/top-think/framework/issues",
|
||||||
|
"source": "https://github.com/top-think/framework/tree/v8.1.4"
|
||||||
|
},
|
||||||
|
"time": "2026-01-15T02:45:10+00:00"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "topthink/think-container",
|
||||||
|
"version": "v3.0.2",
|
||||||
|
"source": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/top-think/think-container.git",
|
||||||
|
"reference": "b2df244be1e7399ad4c8be1ccc40ed57868f730a"
|
||||||
|
},
|
||||||
|
"dist": {
|
||||||
|
"type": "zip",
|
||||||
|
"url": "https://api.github.com/repos/top-think/think-container/zipball/b2df244be1e7399ad4c8be1ccc40ed57868f730a",
|
||||||
|
"reference": "b2df244be1e7399ad4c8be1ccc40ed57868f730a",
|
||||||
|
"shasum": ""
|
||||||
|
},
|
||||||
|
"require": {
|
||||||
|
"php": ">=8.0",
|
||||||
|
"psr/container": "^2.0",
|
||||||
|
"topthink/think-helper": "^3.1"
|
||||||
|
},
|
||||||
|
"require-dev": {
|
||||||
|
"phpunit/phpunit": "^9.5"
|
||||||
|
},
|
||||||
|
"type": "library",
|
||||||
|
"autoload": {
|
||||||
|
"files": [],
|
||||||
|
"psr-4": {
|
||||||
|
"think\\": "src"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"notification-url": "https://packagist.org/downloads/",
|
||||||
|
"license": [
|
||||||
|
"Apache-2.0"
|
||||||
|
],
|
||||||
|
"authors": [
|
||||||
|
{
|
||||||
|
"name": "liu21st",
|
||||||
|
"email": "[email protected]"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"description": "PHP Container & Facade Manager",
|
||||||
|
"support": {
|
||||||
|
"issues": "https://github.com/top-think/think-container/issues",
|
||||||
|
"source": "https://github.com/top-think/think-container/tree/v3.0.2"
|
||||||
|
},
|
||||||
|
"time": "2025-04-07T03:21:51+00:00"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "topthink/think-filesystem",
|
||||||
|
"version": "v3.0.0",
|
||||||
|
"source": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/top-think/think-filesystem.git",
|
||||||
|
"reference": "7a1231a65bca278de9b7f9236767eef9741dfe5c"
|
||||||
|
},
|
||||||
|
"dist": {
|
||||||
|
"type": "zip",
|
||||||
|
"url": "https://api.github.com/repos/top-think/think-filesystem/zipball/7a1231a65bca278de9b7f9236767eef9741dfe5c",
|
||||||
|
"reference": "7a1231a65bca278de9b7f9236767eef9741dfe5c",
|
||||||
|
"shasum": ""
|
||||||
|
},
|
||||||
|
"require": {
|
||||||
|
"league/flysystem": "^3.0",
|
||||||
|
"php": "^8.2",
|
||||||
|
"topthink/framework": "^8.0"
|
||||||
|
},
|
||||||
|
"require-dev": {
|
||||||
|
"mikey179/vfsstream": "^1.6",
|
||||||
|
"mockery/mockery": "^1.2",
|
||||||
|
"phpunit/phpunit": "^11.5"
|
||||||
|
},
|
||||||
|
"type": "library",
|
||||||
|
"autoload": {
|
||||||
|
"psr-4": {
|
||||||
|
"think\\": "src"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"notification-url": "https://packagist.org/downloads/",
|
||||||
|
"license": [
|
||||||
|
"Apache-2.0"
|
||||||
|
],
|
||||||
|
"authors": [
|
||||||
|
{
|
||||||
|
"name": "yunwuxin",
|
||||||
|
"email": "[email protected]"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"description": "The ThinkPHP6.1 Filesystem Package",
|
||||||
|
"support": {
|
||||||
|
"issues": "https://github.com/top-think/think-filesystem/issues",
|
||||||
|
"source": "https://github.com/top-think/think-filesystem/tree/v3.0.0"
|
||||||
|
},
|
||||||
|
"time": "2024-12-10T06:23:28+00:00"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "topthink/think-helper",
|
||||||
|
"version": "v3.1.12",
|
||||||
|
"source": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/top-think/think-helper.git",
|
||||||
|
"reference": "fe277121112a8f1c872e169a733ca80bb11c4acb"
|
||||||
|
},
|
||||||
|
"dist": {
|
||||||
|
"type": "zip",
|
||||||
|
"url": "https://api.github.com/repos/top-think/think-helper/zipball/fe277121112a8f1c872e169a733ca80bb11c4acb",
|
||||||
|
"reference": "fe277121112a8f1c872e169a733ca80bb11c4acb",
|
||||||
|
"shasum": ""
|
||||||
|
},
|
||||||
|
"require": {
|
||||||
|
"php": ">=7.1.0"
|
||||||
|
},
|
||||||
|
"require-dev": {
|
||||||
|
"phpunit/phpunit": "^9.5"
|
||||||
|
},
|
||||||
|
"type": "library",
|
||||||
|
"autoload": {
|
||||||
|
"files": [
|
||||||
|
"src/helper.php"
|
||||||
|
],
|
||||||
|
"psr-4": {
|
||||||
|
"think\\": "src"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"notification-url": "https://packagist.org/downloads/",
|
||||||
|
"license": [
|
||||||
|
"Apache-2.0"
|
||||||
|
],
|
||||||
|
"authors": [
|
||||||
|
{
|
||||||
|
"name": "yunwuxin",
|
||||||
|
"email": "[email protected]"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"description": "The ThinkPHP6 Helper Package",
|
||||||
|
"support": {
|
||||||
|
"issues": "https://github.com/top-think/think-helper/issues",
|
||||||
|
"source": "https://github.com/top-think/think-helper/tree/v3.1.12"
|
||||||
|
},
|
||||||
|
"time": "2025-12-26T09:58:29+00:00"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "topthink/think-migration",
|
||||||
|
"version": "v3.1.1",
|
||||||
|
"source": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/top-think/think-migration.git",
|
||||||
|
"reference": "22c44058e1454f3af1d346e7f6524fbe654de7fb"
|
||||||
|
},
|
||||||
|
"dist": {
|
||||||
|
"type": "zip",
|
||||||
|
"url": "https://api.github.com/repos/top-think/think-migration/zipball/22c44058e1454f3af1d346e7f6524fbe654de7fb",
|
||||||
|
"reference": "22c44058e1454f3af1d346e7f6524fbe654de7fb",
|
||||||
|
"shasum": ""
|
||||||
|
},
|
||||||
|
"require": {
|
||||||
|
"php": ">=7.2",
|
||||||
|
"topthink/framework": "^6.0 || ^8.0",
|
||||||
|
"topthink/think-helper": "^3.0.3"
|
||||||
|
},
|
||||||
|
"require-dev": {
|
||||||
|
"composer/composer": "^2.5.8",
|
||||||
|
"fzaninotto/faker": "^1.8",
|
||||||
|
"robmorgan/phinx": "^0.13.4"
|
||||||
|
},
|
||||||
|
"suggest": {
|
||||||
|
"fzaninotto/faker": "Required to use the factory builder (^1.8)."
|
||||||
|
},
|
||||||
|
"type": "library",
|
||||||
|
"extra": {
|
||||||
|
"think": {
|
||||||
|
"services": [
|
||||||
|
"think\\migration\\Service"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"autoload": {
|
||||||
|
"psr-4": {
|
||||||
|
"Phinx\\": "phinx",
|
||||||
|
"think\\migration\\": "src"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"notification-url": "https://packagist.org/downloads/",
|
||||||
|
"license": [
|
||||||
|
"Apache-2.0"
|
||||||
|
],
|
||||||
|
"authors": [
|
||||||
|
{
|
||||||
|
"name": "yunwuxin",
|
||||||
|
"email": "[email protected]"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"support": {
|
||||||
|
"issues": "https://github.com/top-think/think-migration/issues",
|
||||||
|
"source": "https://github.com/top-think/think-migration/tree/v3.1.1"
|
||||||
|
},
|
||||||
|
"time": "2023-09-14T05:51:31+00:00"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "topthink/think-orm",
|
||||||
|
"version": "v4.0.51",
|
||||||
|
"source": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/top-think/think-orm.git",
|
||||||
|
"reference": "46abe2f824eb3bcb117d4c0ce93b203b592b79f7"
|
||||||
|
},
|
||||||
|
"dist": {
|
||||||
|
"type": "zip",
|
||||||
|
"url": "https://api.github.com/repos/top-think/think-orm/zipball/46abe2f824eb3bcb117d4c0ce93b203b592b79f7",
|
||||||
|
"reference": "46abe2f824eb3bcb117d4c0ce93b203b592b79f7",
|
||||||
|
"shasum": ""
|
||||||
|
},
|
||||||
|
"require": {
|
||||||
|
"ext-json": "*",
|
||||||
|
"ext-pdo": "*",
|
||||||
|
"php": ">=8.0.0",
|
||||||
|
"psr/log": ">=1.0",
|
||||||
|
"psr/simple-cache": "^3.0",
|
||||||
|
"topthink/think-helper": "^3.1",
|
||||||
|
"topthink/think-validate": "^3.0"
|
||||||
|
},
|
||||||
|
"require-dev": {
|
||||||
|
"phpunit/phpunit": "^9.6|^10"
|
||||||
|
},
|
||||||
|
"suggest": {
|
||||||
|
"ext-mongodb": "provide mongodb support"
|
||||||
|
},
|
||||||
|
"type": "library",
|
||||||
|
"autoload": {
|
||||||
|
"files": [
|
||||||
|
"src/helper.php",
|
||||||
|
"stubs/load_stubs.php"
|
||||||
|
],
|
||||||
|
"psr-4": {
|
||||||
|
"think\\": "src"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"notification-url": "https://packagist.org/downloads/",
|
||||||
|
"license": [
|
||||||
|
"Apache-2.0"
|
||||||
|
],
|
||||||
|
"authors": [
|
||||||
|
{
|
||||||
|
"name": "liu21st",
|
||||||
|
"email": "[email protected]"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"description": "the PHP Database&ORM Framework",
|
||||||
|
"keywords": [
|
||||||
|
"database",
|
||||||
|
"orm"
|
||||||
|
],
|
||||||
|
"support": {
|
||||||
|
"issues": "https://github.com/top-think/think-orm/issues",
|
||||||
|
"source": "https://github.com/top-think/think-orm/tree/v4.0.51"
|
||||||
|
},
|
||||||
|
"time": "2025-12-18T13:11:52+00:00"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "topthink/think-template",
|
||||||
|
"version": "v3.0.2",
|
||||||
|
"source": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/top-think/think-template.git",
|
||||||
|
"reference": "0b88bd449f0f7626dd75b05f557c8bc208c08b0c"
|
||||||
|
},
|
||||||
|
"dist": {
|
||||||
|
"type": "zip",
|
||||||
|
"url": "https://api.github.com/repos/top-think/think-template/zipball/0b88bd449f0f7626dd75b05f557c8bc208c08b0c",
|
||||||
|
"reference": "0b88bd449f0f7626dd75b05f557c8bc208c08b0c",
|
||||||
|
"shasum": ""
|
||||||
|
},
|
||||||
|
"require": {
|
||||||
|
"php": ">=8.0.0",
|
||||||
|
"psr/simple-cache": ">=1.0"
|
||||||
|
},
|
||||||
|
"type": "library",
|
||||||
|
"autoload": {
|
||||||
|
"psr-4": {
|
||||||
|
"think\\": "src"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"notification-url": "https://packagist.org/downloads/",
|
||||||
|
"license": [
|
||||||
|
"Apache-2.0"
|
||||||
|
],
|
||||||
|
"authors": [
|
||||||
|
{
|
||||||
|
"name": "liu21st",
|
||||||
|
"email": "[email protected]"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"description": "the php template engine",
|
||||||
|
"support": {
|
||||||
|
"issues": "https://github.com/top-think/think-template/issues",
|
||||||
|
"source": "https://github.com/top-think/think-template/tree/v3.0.2"
|
||||||
|
},
|
||||||
|
"time": "2024-10-16T03:41:06+00:00"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "topthink/think-validate",
|
||||||
|
"version": "v3.0.7",
|
||||||
|
"source": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/top-think/think-validate.git",
|
||||||
|
"reference": "85063f6d4ef8ed122f17a36179dc3e0949b30988"
|
||||||
|
},
|
||||||
|
"dist": {
|
||||||
|
"type": "zip",
|
||||||
|
"url": "https://api.github.com/repos/top-think/think-validate/zipball/85063f6d4ef8ed122f17a36179dc3e0949b30988",
|
||||||
|
"reference": "85063f6d4ef8ed122f17a36179dc3e0949b30988",
|
||||||
|
"shasum": ""
|
||||||
|
},
|
||||||
|
"require": {
|
||||||
|
"php": ">=8.0",
|
||||||
|
"topthink/think-container": ">=3.0"
|
||||||
|
},
|
||||||
|
"type": "library",
|
||||||
|
"autoload": {
|
||||||
|
"files": [
|
||||||
|
"src/helper.php"
|
||||||
|
],
|
||||||
|
"psr-4": {
|
||||||
|
"think\\": "src"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"notification-url": "https://packagist.org/downloads/",
|
||||||
|
"license": [
|
||||||
|
"Apache-2.0"
|
||||||
|
],
|
||||||
|
"authors": [
|
||||||
|
{
|
||||||
|
"name": "liu21st",
|
||||||
|
"email": "[email protected]"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"description": "think validate",
|
||||||
|
"support": {
|
||||||
|
"issues": "https://github.com/top-think/think-validate/issues",
|
||||||
|
"source": "https://github.com/top-think/think-validate/tree/v3.0.7"
|
||||||
|
},
|
||||||
|
"time": "2025-06-11T05:51:40+00:00"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "topthink/think-view",
|
||||||
|
"version": "v2.0.5",
|
||||||
|
"source": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/top-think/think-view.git",
|
||||||
|
"reference": "b42009b98199b5a3833d3d6fd18c8a55aa511fad"
|
||||||
|
},
|
||||||
|
"dist": {
|
||||||
|
"type": "zip",
|
||||||
|
"url": "https://api.github.com/repos/top-think/think-view/zipball/b42009b98199b5a3833d3d6fd18c8a55aa511fad",
|
||||||
|
"reference": "b42009b98199b5a3833d3d6fd18c8a55aa511fad",
|
||||||
|
"shasum": ""
|
||||||
|
},
|
||||||
|
"require": {
|
||||||
|
"php": ">=8.0.0",
|
||||||
|
"topthink/think-template": "^3.0"
|
||||||
|
},
|
||||||
|
"type": "library",
|
||||||
|
"autoload": {
|
||||||
|
"psr-4": {
|
||||||
|
"think\\view\\driver\\": "src"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"notification-url": "https://packagist.org/downloads/",
|
||||||
|
"license": [
|
||||||
|
"Apache-2.0"
|
||||||
|
],
|
||||||
|
"authors": [
|
||||||
|
{
|
||||||
|
"name": "liu21st",
|
||||||
|
"email": "[email protected]"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"description": "thinkphp template driver",
|
||||||
|
"support": {
|
||||||
|
"issues": "https://github.com/top-think/think-view/issues",
|
||||||
|
"source": "https://github.com/top-think/think-view/tree/v2.0.5"
|
||||||
|
},
|
||||||
|
"time": "2025-03-19T07:04:19+00:00"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"packages-dev": [
|
||||||
|
{
|
||||||
|
"name": "symfony/deprecation-contracts",
|
||||||
|
"version": "v3.7.1",
|
||||||
|
"source": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/symfony/deprecation-contracts.git",
|
||||||
|
"reference": "f3202fa1b5097b0af062dc978b32ecf63404e31d"
|
||||||
|
},
|
||||||
|
"dist": {
|
||||||
|
"type": "zip",
|
||||||
|
"url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/f3202fa1b5097b0af062dc978b32ecf63404e31d",
|
||||||
|
"reference": "f3202fa1b5097b0af062dc978b32ecf63404e31d",
|
||||||
|
"shasum": ""
|
||||||
|
},
|
||||||
|
"require": {
|
||||||
|
"php": ">=8.1"
|
||||||
|
},
|
||||||
|
"type": "library",
|
||||||
|
"extra": {
|
||||||
|
"thanks": {
|
||||||
|
"url": "https://github.com/symfony/contracts",
|
||||||
|
"name": "symfony/contracts"
|
||||||
|
},
|
||||||
|
"branch-alias": {
|
||||||
|
"dev-main": "3.7-dev"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"autoload": {
|
||||||
|
"files": [
|
||||||
|
"function.php"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"notification-url": "https://packagist.org/downloads/",
|
||||||
|
"license": [
|
||||||
|
"MIT"
|
||||||
|
],
|
||||||
|
"authors": [
|
||||||
|
{
|
||||||
|
"name": "Nicolas Grekas",
|
||||||
|
"email": "[email protected]"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Symfony Community",
|
||||||
|
"homepage": "https://symfony.com/contributors"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"description": "A generic function and convention to trigger deprecation notices",
|
||||||
|
"homepage": "https://symfony.com",
|
||||||
|
"support": {
|
||||||
|
"source": "https://github.com/symfony/deprecation-contracts/tree/v3.7.1"
|
||||||
|
},
|
||||||
|
"funding": [
|
||||||
|
{
|
||||||
|
"url": "https://symfony.com/sponsor",
|
||||||
|
"type": "custom"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"url": "https://github.com/fabpot",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"url": "https://github.com/nicolas-grekas",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
|
||||||
|
"type": "tidelift"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"time": "2026-06-05T06:23:12+00:00"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "symfony/polyfill-mbstring",
|
||||||
|
"version": "v1.38.2",
|
||||||
|
"source": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/symfony/polyfill-mbstring.git",
|
||||||
|
"reference": "d3d318bad5e7a1bfbd026009c8bfb8d8f99ae6b6"
|
||||||
|
},
|
||||||
|
"dist": {
|
||||||
|
"type": "zip",
|
||||||
|
"url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/d3d318bad5e7a1bfbd026009c8bfb8d8f99ae6b6",
|
||||||
|
"reference": "d3d318bad5e7a1bfbd026009c8bfb8d8f99ae6b6",
|
||||||
|
"shasum": ""
|
||||||
|
},
|
||||||
|
"require": {
|
||||||
|
"ext-iconv": "*",
|
||||||
|
"php": ">=7.2"
|
||||||
|
},
|
||||||
|
"provide": {
|
||||||
|
"ext-mbstring": "*"
|
||||||
|
},
|
||||||
|
"suggest": {
|
||||||
|
"ext-mbstring": "For best performance"
|
||||||
|
},
|
||||||
|
"type": "library",
|
||||||
|
"extra": {
|
||||||
|
"thanks": {
|
||||||
|
"url": "https://github.com/symfony/polyfill",
|
||||||
|
"name": "symfony/polyfill"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"autoload": {
|
||||||
|
"files": [
|
||||||
|
"bootstrap.php"
|
||||||
|
],
|
||||||
|
"psr-4": {
|
||||||
|
"Symfony\\Polyfill\\Mbstring\\": ""
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"notification-url": "https://packagist.org/downloads/",
|
||||||
|
"license": [
|
||||||
|
"MIT"
|
||||||
|
],
|
||||||
|
"authors": [
|
||||||
|
{
|
||||||
|
"name": "Nicolas Grekas",
|
||||||
|
"email": "[email protected]"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Symfony Community",
|
||||||
|
"homepage": "https://symfony.com/contributors"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"description": "Symfony polyfill for the Mbstring extension",
|
||||||
|
"homepage": "https://symfony.com",
|
||||||
|
"keywords": [
|
||||||
|
"compatibility",
|
||||||
|
"mbstring",
|
||||||
|
"polyfill",
|
||||||
|
"portable",
|
||||||
|
"shim"
|
||||||
|
],
|
||||||
|
"support": {
|
||||||
|
"source": "https://github.com/symfony/polyfill-mbstring/tree/v1.38.2"
|
||||||
|
},
|
||||||
|
"funding": [
|
||||||
|
{
|
||||||
|
"url": "https://symfony.com/sponsor",
|
||||||
|
"type": "custom"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"url": "https://github.com/fabpot",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"url": "https://github.com/nicolas-grekas",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
|
||||||
|
"type": "tidelift"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"time": "2026-05-27T06:59:30+00:00"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "symfony/var-dumper",
|
||||||
|
"version": "v7.4.14",
|
||||||
|
"source": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/symfony/var-dumper.git",
|
||||||
|
"reference": "9a3a56a4a1e65a5cb4f8d13801fe8ab0a170e358"
|
||||||
|
},
|
||||||
|
"dist": {
|
||||||
|
"type": "zip",
|
||||||
|
"url": "https://api.github.com/repos/symfony/var-dumper/zipball/9a3a56a4a1e65a5cb4f8d13801fe8ab0a170e358",
|
||||||
|
"reference": "9a3a56a4a1e65a5cb4f8d13801fe8ab0a170e358",
|
||||||
|
"shasum": ""
|
||||||
|
},
|
||||||
|
"require": {
|
||||||
|
"php": ">=8.2",
|
||||||
|
"symfony/deprecation-contracts": "^2.5|^3",
|
||||||
|
"symfony/polyfill-mbstring": "~1.0"
|
||||||
|
},
|
||||||
|
"conflict": {
|
||||||
|
"symfony/console": "<6.4"
|
||||||
|
},
|
||||||
|
"require-dev": {
|
||||||
|
"symfony/console": "^6.4|^7.0|^8.0",
|
||||||
|
"symfony/http-kernel": "^6.4|^7.0|^8.0",
|
||||||
|
"symfony/process": "^6.4|^7.0|^8.0",
|
||||||
|
"symfony/uid": "^6.4|^7.0|^8.0",
|
||||||
|
"twig/twig": "^3.12"
|
||||||
|
},
|
||||||
|
"bin": [
|
||||||
|
"Resources/bin/var-dump-server"
|
||||||
|
],
|
||||||
|
"type": "library",
|
||||||
|
"autoload": {
|
||||||
|
"files": [
|
||||||
|
"Resources/functions/dump.php"
|
||||||
|
],
|
||||||
|
"psr-4": {
|
||||||
|
"Symfony\\Component\\VarDumper\\": ""
|
||||||
|
},
|
||||||
|
"exclude-from-classmap": [
|
||||||
|
"/Tests/"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"notification-url": "https://packagist.org/downloads/",
|
||||||
|
"license": [
|
||||||
|
"MIT"
|
||||||
|
],
|
||||||
|
"authors": [
|
||||||
|
{
|
||||||
|
"name": "Nicolas Grekas",
|
||||||
|
"email": "[email protected]"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Symfony Community",
|
||||||
|
"homepage": "https://symfony.com/contributors"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"description": "Provides mechanisms for walking through any arbitrary PHP variable",
|
||||||
|
"homepage": "https://symfony.com",
|
||||||
|
"keywords": [
|
||||||
|
"debug",
|
||||||
|
"dump"
|
||||||
|
],
|
||||||
|
"support": {
|
||||||
|
"source": "https://github.com/symfony/var-dumper/tree/v7.4.14"
|
||||||
|
},
|
||||||
|
"funding": [
|
||||||
|
{
|
||||||
|
"url": "https://symfony.com/sponsor",
|
||||||
|
"type": "custom"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"url": "https://github.com/fabpot",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"url": "https://github.com/nicolas-grekas",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
|
||||||
|
"type": "tidelift"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"time": "2026-06-08T20:24:16+00:00"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "topthink/think-dumper",
|
||||||
|
"version": "v1.0.7",
|
||||||
|
"source": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/top-think/think-dumper.git",
|
||||||
|
"reference": "1bd79783bf9551330c7cf55c9ef49c82b3a2e110"
|
||||||
|
},
|
||||||
|
"dist": {
|
||||||
|
"type": "zip",
|
||||||
|
"url": "https://api.github.com/repos/top-think/think-dumper/zipball/1bd79783bf9551330c7cf55c9ef49c82b3a2e110",
|
||||||
|
"reference": "1bd79783bf9551330c7cf55c9ef49c82b3a2e110",
|
||||||
|
"shasum": ""
|
||||||
|
},
|
||||||
|
"require": {
|
||||||
|
"php": ">=8.0.2",
|
||||||
|
"symfony/var-dumper": ">=6.0",
|
||||||
|
"topthink/framework": "^6.0|^8.0"
|
||||||
|
},
|
||||||
|
"require-dev": {
|
||||||
|
"phpunit/phpunit": "^11.4"
|
||||||
|
},
|
||||||
|
"type": "library",
|
||||||
|
"autoload": {
|
||||||
|
"files": [
|
||||||
|
"src/helper.php"
|
||||||
|
],
|
||||||
|
"psr-4": {
|
||||||
|
"think\\dumper\\": "src"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"notification-url": "https://packagist.org/downloads/",
|
||||||
|
"license": [
|
||||||
|
"Apache-2.0"
|
||||||
|
],
|
||||||
|
"authors": [
|
||||||
|
{
|
||||||
|
"name": "yunwuxin",
|
||||||
|
"email": "[email protected]"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"description": "Dumper extend for thinkphp",
|
||||||
|
"support": {
|
||||||
|
"issues": "https://github.com/top-think/think-dumper/issues",
|
||||||
|
"source": "https://github.com/top-think/think-dumper/tree/v1.0.7"
|
||||||
|
},
|
||||||
|
"time": "2026-05-29T04:34:25+00:00"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "topthink/think-trace",
|
||||||
|
"version": "v2.0",
|
||||||
|
"source": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/top-think/think-trace.git",
|
||||||
|
"reference": "4ba6da2945b37931d61900a6e55dc02b05e5a63f"
|
||||||
|
},
|
||||||
|
"dist": {
|
||||||
|
"type": "zip",
|
||||||
|
"url": "https://api.github.com/repos/top-think/think-trace/zipball/4ba6da2945b37931d61900a6e55dc02b05e5a63f",
|
||||||
|
"reference": "4ba6da2945b37931d61900a6e55dc02b05e5a63f",
|
||||||
|
"shasum": ""
|
||||||
|
},
|
||||||
|
"require": {
|
||||||
|
"php": ">=8.0",
|
||||||
|
"topthink/framework": "^8.1"
|
||||||
|
},
|
||||||
|
"type": "library",
|
||||||
|
"extra": {
|
||||||
|
"think": {
|
||||||
|
"config": {
|
||||||
|
"trace": "src/config.php"
|
||||||
|
},
|
||||||
|
"services": [
|
||||||
|
"think\\trace\\Service"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"autoload": {
|
||||||
|
"psr-4": {
|
||||||
|
"think\\trace\\": "src"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"notification-url": "https://packagist.org/downloads/",
|
||||||
|
"license": [
|
||||||
|
"Apache-2.0"
|
||||||
|
],
|
||||||
|
"authors": [
|
||||||
|
{
|
||||||
|
"name": "liu21st",
|
||||||
|
"email": "[email protected]"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"description": "thinkphp debug trace",
|
||||||
|
"support": {
|
||||||
|
"issues": "https://github.com/top-think/think-trace/issues",
|
||||||
|
"source": "https://github.com/top-think/think-trace/tree/v2.0"
|
||||||
|
},
|
||||||
|
"time": "2025-06-12T09:18:19+00:00"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"aliases": [],
|
||||||
|
"minimum-stability": "stable",
|
||||||
|
"stability-flags": {},
|
||||||
|
"prefer-stable": false,
|
||||||
|
"prefer-lowest": false,
|
||||||
|
"platform": {
|
||||||
|
"php": ">=8.2.0",
|
||||||
|
"ext-curl": "*",
|
||||||
|
"ext-gd": "*",
|
||||||
|
"ext-mbstring": "*",
|
||||||
|
"ext-openssl": "*",
|
||||||
|
"ext-json": "*",
|
||||||
|
"ext-zip": "*",
|
||||||
|
"ext-pdo": "*",
|
||||||
|
"ext-iconv": "*"
|
||||||
|
},
|
||||||
|
"platform-dev": {},
|
||||||
|
"plugin-api-version": "2.9.0"
|
||||||
|
}
|
||||||
+2
-2
@@ -32,6 +32,6 @@ return [
|
|||||||
// 定义404错误的模板文件地址
|
// 定义404错误的模板文件地址
|
||||||
404 => \think\facade\App::getRootPath() . 'public/404.html',
|
404 => \think\facade\App::getRootPath() . 'public/404.html',
|
||||||
],
|
],
|
||||||
'version' => '1.9',
|
'version' => '1.12',
|
||||||
'ver' => 1091
|
'ver' => 1093
|
||||||
];
|
];
|
||||||
|
|||||||
+2
-2
@@ -49,7 +49,7 @@ INSERT INTO `toolbox_config` (`key`, `value`) VALUES
|
|||||||
('captcha_key', ''),
|
('captcha_key', ''),
|
||||||
('ip_type', '0'),
|
('ip_type', '0'),
|
||||||
('cdn_cdnjs', 'https://s4.zstatic.net/ajax/libs/'),
|
('cdn_cdnjs', 'https://s4.zstatic.net/ajax/libs/'),
|
||||||
('cdn_npm', 'https://unpkg.com/'),
|
('cdn_npm', 'https://s4.zstatic.net/npm/'),
|
||||||
('description', '这是一个非常Nice的在线工具箱'),
|
('description', '这是一个非常Nice的在线工具箱'),
|
||||||
('foot_code', ''),
|
('foot_code', ''),
|
||||||
('keywords', '彩虹工具网,源码查看器原创,在线,工具'),
|
('keywords', '彩虹工具网,源码查看器原创,在线,工具'),
|
||||||
@@ -194,7 +194,7 @@ CREATE TABLE `toolbox_querycache` (
|
|||||||
`content` text,
|
`content` text,
|
||||||
`uptime` datetime NOT NULL,
|
`uptime` datetime NOT NULL,
|
||||||
PRIMARY KEY (`id`),
|
PRIMARY KEY (`id`),
|
||||||
UNIQUE KEY `cachekey` (`key`,`type`),
|
UNIQUE KEY `cachekey` (`key`,`subkey`,`type`),
|
||||||
KEY `cachekey2` (`subkey`,`type`)
|
KEY `cachekey2` (`subkey`,`type`)
|
||||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,31 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace plugin\utility\imghosting\api;
|
||||||
|
|
||||||
|
use Exception;
|
||||||
|
use plugin\utility\imghosting\api;
|
||||||
|
use think\helper\Str;
|
||||||
|
|
||||||
|
class pngcm implements api
|
||||||
|
{
|
||||||
|
public function upload($filepath, $filename){
|
||||||
|
$url = 'https://img.wnflb2023.com/application/upload.php';
|
||||||
|
$file = new \CURLFile($filepath);
|
||||||
|
$file->setPostFilename($filename);
|
||||||
|
$param = [
|
||||||
|
'name' => $filename,
|
||||||
|
'uuid' => 'o_'.Str::random(27),
|
||||||
|
'sign' => time(),
|
||||||
|
'file' => $file,
|
||||||
|
];
|
||||||
|
$data = get_curl($url,$param,'https://img.wnflb2023.com/');
|
||||||
|
$arr = json_decode($data,true);
|
||||||
|
if(isset($arr['code']) && $arr['code']==200){
|
||||||
|
return ['url'=>$arr['url']];
|
||||||
|
}elseif(isset($arr['message'])){
|
||||||
|
throw new Exception('上传失败请重试('.$arr['message'].')');
|
||||||
|
}else{
|
||||||
|
throw new Exception('上传失败!接口错误');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -104,6 +104,10 @@ textarea.form-control{min-height: auto;}
|
|||||||
title: '百度文库',
|
title: '百度文库',
|
||||||
key: 'baidu'
|
key: 'baidu'
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
title: 'fuliba',
|
||||||
|
key: 'pngcm'
|
||||||
|
},
|
||||||
{
|
{
|
||||||
title: 'IMGDD',
|
title: 'IMGDD',
|
||||||
key: 'imgdd'
|
key: 'imgdd'
|
||||||
|
|||||||
@@ -52,4 +52,18 @@ class App extends Plugin
|
|||||||
return msg();
|
return msg();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function bind_device(){
|
||||||
|
$userid = input('post.userid');
|
||||||
|
$token = input('post.token');
|
||||||
|
if(!$userid || !$token) return msg('error','参数不能为空');
|
||||||
|
|
||||||
|
try{
|
||||||
|
$sport = new XiaomiSport();
|
||||||
|
$data = $sport->bind($userid, $token);
|
||||||
|
return msg('ok','success',$data);
|
||||||
|
}catch(Exception $e){
|
||||||
|
return msg('error',$e->getMessage());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -8,15 +8,22 @@ class XiaomiSport
|
|||||||
|
|
||||||
private function getAccess($username, $password){
|
private function getAccess($username, $password){
|
||||||
if(!strpos($username, '@')) $username = '+86'.$username;
|
if(!strpos($username, '@')) $username = '+86'.$username;
|
||||||
$url = 'https://api-user.huami.com/registrations/'.$username.'/tokens';
|
$url = 'https://api-user.zepp.com/v2/registrations/tokens';
|
||||||
$data['client_id'] = 'HuaMi';
|
$data = [
|
||||||
$data['password'] = $password;
|
'emailOrPhone' => $username,
|
||||||
$data['redirect_uri'] = 'https://s3-us-west-2.amazonaws.com/hm-registration/successsignin.html';
|
'password' => $password,
|
||||||
$data['token'] = 'access';
|
'state' => 'REDIRECTION',
|
||||||
$response = $this->curl($url, $data);
|
'client_id' => 'HuaMi',
|
||||||
preg_match("/access=(.*?)&/", $response['header'], $access);
|
'country_code' => 'CN',
|
||||||
if(isset($access[1])){
|
'token' => 'access',
|
||||||
|
'redirect_uri' => 'https://s3-us-west-2.amazonaws.com/hm-registration/successsignin.html',
|
||||||
|
];
|
||||||
|
$body = $this->encryptData(http_build_query($data));
|
||||||
|
$response = $this->curl($url, $body, null, true);
|
||||||
|
if(preg_match("/access=(.*?)&/", $response['header'], $access)){
|
||||||
return $access[1];
|
return $access[1];
|
||||||
|
}elseif(preg_match("/refresh=(.*?)&/", $response['header'], $refresh)){
|
||||||
|
return $refresh[1];
|
||||||
}elseif(strpos($response['header'], 'error=')){
|
}elseif(strpos($response['header'], 'error=')){
|
||||||
throw new Exception('账号或密码错误!');
|
throw new Exception('账号或密码错误!');
|
||||||
}else{
|
}else{
|
||||||
@@ -24,18 +31,29 @@ class XiaomiSport
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private function encryptData($plain)
|
||||||
|
{
|
||||||
|
$key = 'xeNtBVqzDc6tuNTh';
|
||||||
|
$iv = 'MAAAYAAAAAAAAABg';
|
||||||
|
$cipher = openssl_encrypt($plain, 'AES-128-CBC', $key, OPENSSL_RAW_DATA, $iv);
|
||||||
|
return $cipher;
|
||||||
|
}
|
||||||
|
|
||||||
public function login($username, $password){
|
public function login($username, $password){
|
||||||
$access = $this->getAccess($username, $password);
|
$access = $this->getAccess($username, $password);
|
||||||
$url = 'https://account.huami.com/v2/client/login';
|
$url = 'https://account.zepp.com/v2/client/login';
|
||||||
$data = [
|
$data = [
|
||||||
'app_name' => 'com.xiaomi.hm.health',
|
'app_name' => 'com.xiaomi.hm.health',
|
||||||
'app_version' => '4.6.0',
|
'app_version' => '6.14.0',
|
||||||
'code' => $access,
|
'code' => $access,
|
||||||
'country_code' => 'CN',
|
'country_code' => 'CN',
|
||||||
'device_id' => '2C8B4939-0CCD-4E94-8CBA-CB8EA6E613A1',
|
'device_id' => '2C8B4939-0CCD-4E94-8CBA-CB8EA6E613A1',
|
||||||
'device_model' => 'phone',
|
'device_model' => 'android_phone',
|
||||||
'grant_type' => 'access_token',
|
'grant_type' => 'access_token',
|
||||||
'third_name' => 'huami',
|
'third_name' => 'huami',
|
||||||
|
'dn' => 'account.zepp.com,api-user.zepp.com,api-mifit.zepp.com,api-watch.zepp.com,app-analytics.zepp.com,api-analytics.huami.com,auth.zepp.com',
|
||||||
|
'source' => 'com.xiaomi.hm.health:6.14.0:50818',
|
||||||
|
'lang' => 'zh',
|
||||||
];
|
];
|
||||||
$response = $this->curl($url, $data);
|
$response = $this->curl($url, $data);
|
||||||
$arr = json_decode($response['body'], true);
|
$arr = json_decode($response['body'], true);
|
||||||
@@ -51,7 +69,7 @@ class XiaomiSport
|
|||||||
}
|
}
|
||||||
|
|
||||||
public function step($userid, $token, $step){
|
public function step($userid, $token, $step){
|
||||||
$url = "https://api-mifit-cn.huami.com/v1/data/band_data.json?&t=" . time();
|
$url = "https://api-mifit-cn.zepp.com/v1/data/band_data.json?&t=" . time();
|
||||||
|
|
||||||
$json = '[{"data_hr":"\/\/\/\/\/\/9L\/\/\/\/\/\/\/\/\/\/\/\/Vv\/\/\/\/\/\/\/\/\/\/\/0v\/\/\/\/\/\/\/\/\/\/\/9e\/\/\/\/\/0n\/a\/\/\/S\/\/\/\/\/\/\/\/\/\/\/\/0b\/\/\/\/\/\/\/\/\/\/1FK\/\/\/\/\/\/\/\/\/\/\/\/R\/\/\/\/\/\/\/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AAfgAAfgAAfgAAfgAA","tz":32,"did":"DA932FFFFE8816E7","src":24}],"summary":"{\"v\":6,\"slp\":{\"st\":1628296479,\"ed\":1628296479,\"dp\":0,\"lt\":0,\"wk\":0,\"usrSt\":-1440,\"usrEd\":-1440,\"wc\":0,\"is\":0,\"lb\":0,\"to\":0,\"dt\":0,\"rhr\":0,\"ss\":0},\"stp\":{\"ttl\":' . $step . ',\"dis\":10627,\"cal\":510,\"wk\":41,\"rn\":50,\"runDist\":7654,\"runCal\":397,\"stage\":[{\"start\":327,\"stop\":341,\"mode\":1,\"dis\":481,\"cal\":13,\"step\":680},{\"start\":342,\"stop\":367,\"mode\":3,\"dis\":2295,\"cal\":95,\"step\":2874},{\"start\":368,\"stop\":377,\"mode\":4,\"dis\":1592,\"cal\":88,\"step\":1664},{\"start\":378,\"stop\":386,\"mode\":3,\"dis\":1072,\"cal\":51,\"step\":1245},{\"start\":387,\"stop\":393,\"mode\":4,\"dis\":1036,\"cal\":57,\"step\":1124},{\"start\":394,\"stop\":398,\"mode\":3,\"dis\":488,\"cal\":19,\"step\":607},{\"start\":399,\"stop\":414,\"mode\":4,\"dis\":2220,\"cal\":120,\"step\":2371},{\"start\":415,\"stop\":427,\"mode\":3,\"dis\":1268,\"cal\":59,\"step\":1489},{\"start\":428,\"stop\":433,\"mode\":1,\"dis\":152,\"cal\":4,\"step\":238},{\"start\":434,\"stop\":444,\"mode\":3,\"dis\":2295,\"cal\":95,\"step\":2874},{\"start\":445,\"stop\":455,\"mode\":4,\"dis\":1592,\"cal\":88,\"step\":1664},{\"start\":456,\"stop\":466,\"mode\":3,\"dis\":1072,\"cal\":51,\"step\":1245},{\"start\":467,\"stop\":477,\"mode\":4,\"dis\":1036,\"cal\":57,\"step\":1124},{\"start\":478,\"stop\":488,\"mode\":3,\"dis\":488,\"cal\":19,\"step\":607},{\"start\":489,\"stop\":499,\"mode\":4,\"dis\":2220,\"cal\":120,\"step\":2371},{\"start\":500,\"stop\":511,\"mode\":3,\"d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AAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAA","tz":32,"did":"DA932FFFFE8816E7","src":24}],"summary":"{\"v\":6,\"slp\":{\"st\":1628296479,\"ed\":1628296479,\"dp\":0,\"lt\":0,\"wk\":0,\"usrSt\":-1440,\"usrEd\":-1440,\"wc\":0,\"is\":0,\"lb\":0,\"to\":0,\"dt\":0,\"rhr\":0,\"ss\":0},\"stp\":{\"ttl\":' . $step . ',\"dis\":10627,\"cal\":510,\"wk\":41,\"rn\":50,\"runDist\":7654,\"runCal\":397,\"stage\":[{\"start\":327,\"stop\":341,\"mode\":1,\"dis\":481,\"cal\":13,\"step\":680},{\"start\":342,\"stop\":367,\"mode\":3,\"dis\":2295,\"cal\":95,\"step\":2874},{\"start\":368,\"stop\":377,\"mode\":4,\"dis\":1592,\"cal\":88,\"step\":1664},{\"start\":378,\"stop\":386,\"mode\":3,\"dis\":1072,\"cal\":51,\"step\":1245},{\"start\":387,\"stop\":393,\"mode\":4,\"dis\":1036,\"cal\":57,\"step\":1124},{\"start\":394,\"stop\":398,\"mode\":3,\"dis\":488,\"cal\":19,\"step\":607},{\"start\":399,\"stop\":414,\"mode\":4,\"dis\":2220,\"cal\":120,\"step\":2371},{\"start\":415,\"stop\":427,\"mode\":3,\"dis\":1268,\"cal\":59,\"step\":1489},{\"start\":428,\"stop\":433,\"mode\":1,\"dis\":152,\"cal\":4,\"step\":238},{\"start\":434,\"stop\":444,\"mode\":3,\"dis\":2295,\"cal\":95,\"step\":2874},{\"start\":445,\"stop\":455,\"mode\":4,\"dis\":1592,\"cal\":88,\"step\":1664},{\"start\":456,\"stop\":466,\"mode\":3,\"dis\":1072,\"cal\":51,\"step\":1245},{\"start\":467,\"stop\":477,\"mode\":4,\"dis\":1036,\"cal\":57,\"step\":1124},{\"start\":478,\"stop\":488,\"mode\":3,\"dis\":488,\"cal\":19,\"step\":607},{\"start\":489,\"stop\":499,\"mode\":4,\"dis\":2220,\"cal\":120,\"step\":2371},{\"start\":500,\"stop\":511,\"mode\":3,\"dis\":1268,\"cal\":59,\"step\":1489},{\"start\":512,\"stop\":522,\"mode\":1,\"dis\":152,\"cal\":4,\"step\":238}]},\"goal\":8000,\"tz\":\"28800\"}","source":24,"type":0}]';
|
||||||
|
|
||||||
@@ -65,7 +83,9 @@ class XiaomiSport
|
|||||||
|
|
||||||
$response = $this->curl($url, $data, $token);
|
$response = $this->curl($url, $data, $token);
|
||||||
$arr = json_decode($response['body'], true);
|
$arr = json_decode($response['body'], true);
|
||||||
if(!$arr){
|
if($response['code'] == 401){
|
||||||
|
throw new Exception('Token已失效,请重新登录');
|
||||||
|
}elseif(!$arr){
|
||||||
throw new Exception('修改步数接口请求失败');
|
throw new Exception('修改步数接口请求失败');
|
||||||
}elseif(isset($arr['code']) && $arr['code']==1){
|
}elseif(isset($arr['code']) && $arr['code']==1){
|
||||||
return true;
|
return true;
|
||||||
@@ -74,13 +94,106 @@ class XiaomiSport
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private function getDeviceList($userid, $token){
|
||||||
|
$url = 'https://api-mifit-cn.huami.com/v1/device/lists.json';
|
||||||
|
$time = time();
|
||||||
|
$data = [
|
||||||
|
't' => $time,
|
||||||
|
'callid' => $time,
|
||||||
|
'userid' => $userid,
|
||||||
|
'device' => 'android_35',
|
||||||
|
'device_type' => 'android_phone',
|
||||||
|
'enableMultiDevice' => 'false',
|
||||||
|
'v' => '2.0',
|
||||||
|
'lang' => 'zh_CN',
|
||||||
|
'channel' => 'Normal',
|
||||||
|
'country' => 'CN',
|
||||||
|
'timezone' => 'Asia/Shanghai',
|
||||||
|
'cv' => '50813_6.14.0',
|
||||||
|
];
|
||||||
|
$url .= '?'.http_build_query($data);
|
||||||
|
$response = $this->curl($url, null, $token);
|
||||||
|
$arr = json_decode($response['body'], true);
|
||||||
|
if($response['code'] == 401){
|
||||||
|
throw new Exception('Token已失效,请重新登录');
|
||||||
|
}elseif(!$arr){
|
||||||
|
throw new Exception('获取设备列表请求失败');
|
||||||
|
}elseif(isset($arr['code']) && $arr['code']==1){
|
||||||
|
return $arr['data'];
|
||||||
|
}else{
|
||||||
|
throw new Exception('获取设备列表失败'.(isset($arr['message'])?$arr['message']:$response['body']));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private function curl($url, $data=null, $app_token=null){
|
private function bindDeviceToAccount($userid, $token, $device_mac, $device_id){
|
||||||
|
$url = 'https://api-mifit-cn.huami.com/v1/device/binds.json';
|
||||||
|
$time = time();
|
||||||
|
$data = [
|
||||||
|
'app_time' => $time,
|
||||||
|
'code' => '0',
|
||||||
|
'activeStatus' => '0',
|
||||||
|
'bind_timezone' => '32',
|
||||||
|
'device_type' => '0',
|
||||||
|
'crcedUserId' => '0',
|
||||||
|
'userid' => $userid,
|
||||||
|
'device' => 'android_29',
|
||||||
|
'deviceid' => $device_id,
|
||||||
|
'enableMultiDevice' => 'true',
|
||||||
|
'mac' => $device_mac,
|
||||||
|
'productVersion' => '256',
|
||||||
|
'brandType' => '-1',
|
||||||
|
'productId' => '61', //小米手环 5 NFC版
|
||||||
|
'device_source' => '58',
|
||||||
|
'brand' => 'XiaoMi',
|
||||||
|
'fw_version' => 'V1.0.0.04',
|
||||||
|
'hardwareVersion' => 'V0.44.131.18',
|
||||||
|
'soft_version' => '6.13.1',
|
||||||
|
'sys_model' => 'Xiaomi 10 Pro',
|
||||||
|
'sys_version' => 'Android_35',
|
||||||
|
'v' => '2.0',
|
||||||
|
'lang' => 'zh_CN',
|
||||||
|
'channel' => 'Normal',
|
||||||
|
'country' => 'CN',
|
||||||
|
'timezone' => 'Asia/Shanghai',
|
||||||
|
'cv' => '50813_6.14.0',
|
||||||
|
];
|
||||||
|
$response = $this->curl($url, $data, $token);
|
||||||
|
$arr = json_decode($response['body'], true);
|
||||||
|
if($response['code'] == 401){
|
||||||
|
throw new Exception('Token已失效,请重新登录');
|
||||||
|
}elseif(!$arr){
|
||||||
|
throw new Exception('绑定设备请求失败');
|
||||||
|
}elseif(isset($arr['code']) && $arr['code']==1){
|
||||||
|
return true;
|
||||||
|
}else{
|
||||||
|
throw new Exception('绑定设备失败'.(isset($arr['message'])?$arr['message']:$response['body']));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public function bind($userid, $token){
|
||||||
|
$list = $this->getDeviceList($userid, $token);
|
||||||
|
if(!empty($list)){
|
||||||
|
$device = $list[0];
|
||||||
|
return ['code'=>1, 'userid' => $userid, 'device_id' => $device['deviceid'], 'device_mac' => $device['mac']];
|
||||||
|
}
|
||||||
|
|
||||||
|
$mac = strtoupper(substr(md5(uniqid(microtime(true),true)),0,12));
|
||||||
|
$mac = implode(':', str_split($mac, 2));
|
||||||
|
$device_id = substr(md5(uniqid(microtime(true),true)),0,16);
|
||||||
|
$this->bindDeviceToAccount($userid, $token, $mac, $device_id);
|
||||||
|
return ['code'=>0, 'userid' => $userid, 'device_id' => $device_id, 'device_mac' => $mac];
|
||||||
|
}
|
||||||
|
|
||||||
|
private function curl($url, $data=null, $app_token=null, $ekv = false){
|
||||||
$ch=curl_init();
|
$ch=curl_init();
|
||||||
curl_setopt($ch, CURLOPT_URL, $url);
|
curl_setopt($ch, CURLOPT_URL, $url);
|
||||||
$httpheader[] = "Accept: application/json";
|
$httpheader[] = "Accept: application/json";
|
||||||
$httpheader[] = "Accept-Language: zh-CN,zh;q=0.8";
|
$httpheader[] = "Accept-Language: zh-CN,zh;q=0.8";
|
||||||
$httpheader[] = "Connection: keep-alive";
|
$httpheader[] = "Connection: keep-alive";
|
||||||
|
if($ekv) $httpheader[] = "x-hm-ekv: 1";
|
||||||
|
$httpheader[] = "app_name: com.xiaomi.hm.health";
|
||||||
|
$httpheader[] = "appname: com.xiaomi.hm.health";
|
||||||
|
$httpheader[] = "appplatform: android_phone";
|
||||||
if($app_token){
|
if($app_token){
|
||||||
$httpheader[] = "apptoken: ".$app_token;
|
$httpheader[] = "apptoken: ".$app_token;
|
||||||
}
|
}
|
||||||
@@ -94,13 +207,15 @@ class XiaomiSport
|
|||||||
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);
|
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);
|
||||||
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
|
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
|
||||||
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 10);
|
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 10);
|
||||||
curl_setopt($ch, CURLOPT_USERAGENT, 'Mozilla/5.0 (iPhone; CPU iPhone OS 13_4_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148 MicroMessenger/7.0.12(0x17000c2d) NetType/WIFI Language/zh_CN');
|
curl_setopt($ch, CURLOPT_USERAGENT, 'MiFit6.14.0 (2211133C; Android 15; Density/2.75)');
|
||||||
curl_setopt($ch, CURLOPT_HEADER, 1);
|
curl_setopt($ch, CURLOPT_HEADER, 1);
|
||||||
$ret = curl_exec($ch);
|
$ret = curl_exec($ch);
|
||||||
$headerSize = curl_getinfo($ch, CURLINFO_HEADER_SIZE);
|
$headerSize = curl_getinfo($ch, CURLINFO_HEADER_SIZE);
|
||||||
$header = substr($ret, 0, $headerSize);
|
$header = substr($ret, 0, $headerSize);
|
||||||
$body = substr($ret, $headerSize);
|
$body = substr($ret, $headerSize);
|
||||||
|
$httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
|
||||||
$ret = array();
|
$ret = array();
|
||||||
|
$ret['code'] = $httpCode;
|
||||||
$ret['header'] = $header;
|
$ret['header'] = $header;
|
||||||
$ret['body'] = $body;
|
$ret['body'] = $body;
|
||||||
curl_close($ch);
|
curl_close($ch);
|
||||||
|
|||||||
@@ -34,7 +34,7 @@
|
|||||||
<input type="number" class="form-control" name="step" value="" placeholder="请输入要修改的步数" v-model="step" min="1" max="98000" required>
|
<input type="number" class="form-control" name="step" value="" placeholder="请输入要修改的步数" v-model="step" min="1" max="98000" required>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="alert alert-info">每日步数最大98000,超过将无法增加</div>
|
<div class="alert alert-info">每日步数最大98000,超过将无法增加。若提示未绑定手环设备,可以<a href="javascript:" @click="bind_device">点此绑定虚拟手环</a>。</div>
|
||||||
<button class="btn btn-dim btn-outline-primary btn-block" @click="submit">
|
<button class="btn btn-dim btn-outline-primary btn-block" @click="submit">
|
||||||
提交步数
|
提交步数
|
||||||
</button>
|
</button>
|
||||||
@@ -106,6 +106,20 @@ new Vue({
|
|||||||
layer.alert('提交步数成功!请稍后查看同步情况',{icon:1});
|
layer.alert('提交步数成功!请稍后查看同步情况',{icon:1});
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
bind_device() {
|
||||||
|
var that = this;
|
||||||
|
if(that.userid == '' || that.token == ''){alert('请先登录');return;}
|
||||||
|
httpPost('/api/{$plugin.alias}/bind_device', {
|
||||||
|
userid: that.userid,
|
||||||
|
token: that.token
|
||||||
|
}, function(data){
|
||||||
|
if(data.code == 1){
|
||||||
|
layer.alert('已绑定过设备!',{icon:1});
|
||||||
|
}else{
|
||||||
|
layer.alert('绑定设备成功!',{icon:1});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
back(){
|
back(){
|
||||||
this.haslogin = false;
|
this.haslogin = false;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -17,36 +17,64 @@ class App extends Plugin
|
|||||||
|
|
||||||
public function query(){
|
public function query(){
|
||||||
$video_url = input('post.video_url', null, 'trim');
|
$video_url = input('post.video_url', null, 'trim');
|
||||||
if(!$video_url) return msg('error','视频链接不能为空');
|
if(!$video_url) return json(['code'=>-1, 'msg'=>'视频链接不能为空']);
|
||||||
|
|
||||||
|
$apitype = $this->get_api_type($video_url);
|
||||||
|
if(!$apitype) return json(['code'=>-1, 'msg'=>'不支持该视频链接']);
|
||||||
|
|
||||||
try{
|
$classname = 'plugin\\utility\\videoparse\\api\\'.$apitype;
|
||||||
$result = $this->parse($video_url);
|
if(class_exists($classname)){
|
||||||
return json(['code'=>0, 'msg'=>'success', 'data'=>$result]);
|
$instance = new $classname();
|
||||||
}catch(\Exception $e){
|
try{
|
||||||
return json(['code'=>-1, 'msg'=>$e->getMessage()]);
|
$result = $instance->parse($video_url);
|
||||||
|
return json(['code'=>0, 'msg'=>'success', 'data'=>$result]);
|
||||||
|
}catch(\Exception $e){
|
||||||
|
return json(['code'=>-1, 'msg'=>$e->getMessage()]);
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
return json(['code'=>-1, 'msg'=>'该平台类型不存在']);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function parse($url){
|
private function get_api_type($url){
|
||||||
$url = 'https://yuanxiapi.cn/api/jiexi_video/?url='.urlencode($url);
|
if(strpos($url, 'kg.qq.com/') || preg_match('/kg(\d+).qq.com\//', $url)){
|
||||||
$data = get_curl($url);
|
return 'qmkg';
|
||||||
$arr = json_decode($data, true);
|
|
||||||
if(isset($arr['code']) && $arr['code']==200){
|
|
||||||
if(isset($arr['video'])){
|
|
||||||
$resurl = $arr['video'];
|
|
||||||
}elseif(isset($arr['images'])){
|
|
||||||
$resurl = $arr['images'];
|
|
||||||
}else{
|
|
||||||
throw new \Exception('解析url返回异常');
|
|
||||||
}
|
|
||||||
return [
|
|
||||||
'title' => $arr['desc'],
|
|
||||||
'cover' => $arr['cover'],
|
|
||||||
'url' => $resurl,
|
|
||||||
];
|
|
||||||
}else{
|
|
||||||
throw new \Exception('视频解析失败');
|
|
||||||
}
|
}
|
||||||
|
elseif(strpos($url, 'weishi.qq.com/')){
|
||||||
|
return 'weishi';
|
||||||
|
}
|
||||||
|
elseif(strpos($url, '.huya.com/')){
|
||||||
|
return 'huya';
|
||||||
|
}
|
||||||
|
elseif(strpos($url, '.acfun.cn/')){
|
||||||
|
return 'acfun';
|
||||||
|
}
|
||||||
|
elseif(strpos($url, '.douyin.com/')){
|
||||||
|
return 'douyin';
|
||||||
|
}
|
||||||
|
elseif(strpos($url, '.kuaishou.com/')){
|
||||||
|
return 'kuaishou';
|
||||||
|
}
|
||||||
|
elseif(strpos($url, '.xiaohongshu.com/') || strpos($url, 'xhslink.com/')){
|
||||||
|
return 'xiaohongshu';
|
||||||
|
}
|
||||||
|
elseif(strpos($url, 'toutiao.com/')){
|
||||||
|
return 'toutiao';
|
||||||
|
}
|
||||||
|
elseif(strpos($url, 'v.douyu.com/')){
|
||||||
|
return 'douyu';
|
||||||
|
}
|
||||||
|
elseif(strpos($url, 'weibo.com/') || strpos($url, 'weibo.cn/')){
|
||||||
|
return 'weibo';
|
||||||
|
}
|
||||||
|
elseif(strpos($url, 'pipix.com/')){
|
||||||
|
return 'pipixia';
|
||||||
|
}
|
||||||
|
elseif(strpos($url, 'izuiyou.com/') || strpos($url, 'xiaochuankeji.cn/')){
|
||||||
|
return 'zuiyou';
|
||||||
|
}
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace plugin\utility\videoparse;
|
||||||
|
|
||||||
|
interface api
|
||||||
|
{
|
||||||
|
public function parse($url);
|
||||||
|
}
|
||||||
@@ -0,0 +1,70 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace plugin\utility\videoparse\api;
|
||||||
|
|
||||||
|
use Exception;
|
||||||
|
use plugin\utility\videoparse\api;
|
||||||
|
|
||||||
|
class acfun implements api
|
||||||
|
{
|
||||||
|
public function parse($url){
|
||||||
|
if(preg_match('!/ac(\d+)!', $url, $match)){ //UGC视频
|
||||||
|
$id = $match[1];
|
||||||
|
|
||||||
|
$requrl = 'https://www.acfun.cn/player/ac' . $id;
|
||||||
|
$res = get_curl($requrl);
|
||||||
|
if(preg_match('/window.videoInfo = (.*?);\n/', $res, $match)){
|
||||||
|
//echo $match[1];exit;
|
||||||
|
$arr = json_decode(trim($match[1]), true);
|
||||||
|
$videoinfo = json_decode($arr['currentVideoInfo']['ksPlayJson'], true);
|
||||||
|
if($videoinfo){
|
||||||
|
$video_list = $videoinfo['adaptationSet'][0]['representation'];
|
||||||
|
if(empty($video_list))throw new Exception('视频列表解析失败');
|
||||||
|
$url = $video_list[0]['url'];
|
||||||
|
return [
|
||||||
|
'title' => $arr['title'],
|
||||||
|
'cover' => $arr['coverUrl'],
|
||||||
|
'url' => $url,
|
||||||
|
'time' => date('Y-m-d H:i:s', $arr['createTimeMillis']/1000),
|
||||||
|
'like' => $arr['likeCount'],
|
||||||
|
'author' => $arr['user']['name'],
|
||||||
|
'avatar' => $arr['user']['headUrl'],
|
||||||
|
];
|
||||||
|
}else{
|
||||||
|
throw new Exception('视频信息解析失败');
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
throw new Exception('视频页面解析失败');
|
||||||
|
}
|
||||||
|
}elseif(preg_match('!/aa([0-9\_]+)!', $url, $match)){ //番剧
|
||||||
|
$id = $match[1];
|
||||||
|
|
||||||
|
$requrl = 'https://www.acfun.cn/bangumi/aa' . $id;
|
||||||
|
$res = get_curl($requrl);
|
||||||
|
if(preg_match('/window.bangumiData = (.*?);\n/', $res, $match)){
|
||||||
|
//echo $match[1];exit;
|
||||||
|
$arr = json_decode(trim($match[1]), true);
|
||||||
|
$videoinfo = json_decode($arr['currentVideoInfo']['ksPlayJson'], true);
|
||||||
|
if($videoinfo){
|
||||||
|
$video_list = $videoinfo['adaptationSet'][0]['representation'];
|
||||||
|
if(empty($video_list))throw new Exception('视频列表解析失败');
|
||||||
|
$url = $video_list[0]['url'];
|
||||||
|
return [
|
||||||
|
'title' => $arr['showTitle'],
|
||||||
|
'cover' => $arr['bangumiCoverImageH'],
|
||||||
|
'url' => $url,
|
||||||
|
'time' => date('Y-m-d H:i:s', $arr['onlineTime']/1000),
|
||||||
|
'like' => $arr['bangumiLikeCount'],
|
||||||
|
'author' => $arr['bangumiTitle'],
|
||||||
|
];
|
||||||
|
}else{
|
||||||
|
throw new Exception('视频信息解析失败');
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
throw new Exception('视频页面解析失败');
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
throw new Exception('视频id获取失败');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,41 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace plugin\utility\videoparse\api;
|
||||||
|
|
||||||
|
use Exception;
|
||||||
|
use plugin\utility\videoparse\api;
|
||||||
|
|
||||||
|
class douyin implements api
|
||||||
|
{
|
||||||
|
public function parse($url){
|
||||||
|
$url = 'https://api.makuo.cc/api/get.video.douyin?url='.urlencode($url);
|
||||||
|
$header = ['Authorization: '.config_get('yapi_token')];
|
||||||
|
$data = get_curl($url, 0, 0, 0, 0, 0, 0, $header);
|
||||||
|
$arr = json_decode($data, true);
|
||||||
|
if(isset($arr['code']) && $arr['code']==200){
|
||||||
|
if(isset($arr['data']['video_url'])){
|
||||||
|
return [
|
||||||
|
'title' => $arr['data']['title'],
|
||||||
|
'author' => $arr['data']['author'],
|
||||||
|
'time' => date('Y-m-d H:i:s', $arr['data']['time']),
|
||||||
|
'cover' => $arr['data']['cover'],
|
||||||
|
'url' => $arr['data']['video_url'],
|
||||||
|
];
|
||||||
|
}elseif(isset($arr['data']['images'])){
|
||||||
|
return [
|
||||||
|
'title' => $arr['data']['title'],
|
||||||
|
'author' => $arr['data']['author'],
|
||||||
|
'time' => date('Y-m-d H:i:s', $arr['data']['time']),
|
||||||
|
'cover' => $arr['data']['cover'],
|
||||||
|
'images' => $arr['data']['images'],
|
||||||
|
];
|
||||||
|
}else{
|
||||||
|
throw new Exception('解析url返回异常');
|
||||||
|
}
|
||||||
|
}elseif(isset($arr['msg'])){
|
||||||
|
throw new Exception('视频解析失败,'.$arr['msg']);
|
||||||
|
}else{
|
||||||
|
throw new Exception('视频解析失败');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,129 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace plugin\utility\videoparse\api;
|
||||||
|
|
||||||
|
use Exception;
|
||||||
|
use plugin\utility\videoparse\api;
|
||||||
|
|
||||||
|
class douyu implements api
|
||||||
|
{
|
||||||
|
private static $version = '220320250920';
|
||||||
|
|
||||||
|
public function parse($url){
|
||||||
|
if(preg_match('!\/show\/([a-zA-Z0-9]+)!', $url, $match)){
|
||||||
|
$vid = $match[1];
|
||||||
|
$requrl = 'https://v.douyu.com/show/' . $vid;
|
||||||
|
$res = get_curl($requrl);
|
||||||
|
if(preg_match('/DATA:\{content: (.*?),videoTag:/', $res, $match)){
|
||||||
|
$arr = json_decode($match[1], true);
|
||||||
|
if(isset($arr['point_id'])){
|
||||||
|
$result = [
|
||||||
|
'title' => $arr['title'],
|
||||||
|
'desc' => $arr['contents'],
|
||||||
|
'cover' => $arr['video_pic'],
|
||||||
|
'time' => date('Y-m-d H:i:s', $arr['create_time']),
|
||||||
|
'author' => $arr['author'],
|
||||||
|
'avatar' => $arr['authorIcon']
|
||||||
|
];
|
||||||
|
$requrl = 'https://v.douyu.com/wgapi/vodnc/front/stream/getStreamUrlWeb';
|
||||||
|
$dy_did = md5(microtime(true).rand(1000,9999));
|
||||||
|
$time = time();
|
||||||
|
$sign = $this->getsign($arr['point_id'], $dy_did, $time);
|
||||||
|
$data = [
|
||||||
|
'v' => self::$version,
|
||||||
|
'did' => $dy_did,
|
||||||
|
'tt' => $time,
|
||||||
|
'sign' => $sign,
|
||||||
|
'vid' => $arr['hash_id']
|
||||||
|
];
|
||||||
|
$cookie = 'dy_did='.$dy_did.';';
|
||||||
|
$res = get_curl($requrl, http_build_query($data), $url, $cookie);
|
||||||
|
$arr = json_decode($res, true);
|
||||||
|
if(isset($arr['error']) && $arr['error'] == 0 && isset($arr['data']['thumb_video'])){
|
||||||
|
if(isset($arr['data']['thumb_video']['super'])) $info = $arr['data']['thumb_video']['super'];
|
||||||
|
elseif(isset($arr['data']['thumb_video']['high'])) $info = $arr['data']['thumb_video']['high'];
|
||||||
|
elseif(isset($arr['data']['thumb_video']['normal'])) $info = $arr['data']['thumb_video']['normal'];
|
||||||
|
else throw new Exception('视频解析失败,无可用视频地址');
|
||||||
|
$result['url'] = $info['url'];
|
||||||
|
return $result;
|
||||||
|
}else{
|
||||||
|
throw new Exception('视频解析失败,'.($arr['msg'] ?? ''));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
throw new Exception('视频解析失败');
|
||||||
|
}else{
|
||||||
|
throw new Exception('视频id获取失败');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private function getsign($xx0, $xx1, $xx2)
|
||||||
|
{
|
||||||
|
$k2 = [0x551983fb, 0x63c94be2, 0x0054dfe2, 0x3ba6bd08];
|
||||||
|
$MASK = 0xFFFFFFFF;
|
||||||
|
|
||||||
|
$add = fn(int $a, int $b) => ($a + $b) & $MASK;
|
||||||
|
$rotr = fn(int $x, int $n) => ((($x & $MASK) >> ($n & 31)) | (($x << (32 - ($n & 31))) & $MASK)) & $MASK;
|
||||||
|
$rotl = fn(int $x, int $n) => (((($x << ($n & 31)) & $MASK) | (($x & $MASK) >> (32 - ($n & 31))))) & $MASK;
|
||||||
|
|
||||||
|
$cb = $xx0 . $xx1 . $xx2 . self::$version;
|
||||||
|
$md = hash('md5', $cb, true);
|
||||||
|
$re = array_values(unpack('V4', $md));
|
||||||
|
|
||||||
|
for ($I = 0; $I < 2; $I++) {
|
||||||
|
$v0 = $re[$I * 2]; $v1 = $re[$I * 2 + 1];
|
||||||
|
$sum = 0; $delta = 0x9e3779b9;
|
||||||
|
for ($i = 0; $i < 32; $i++) {
|
||||||
|
$sum = $add($sum, $delta);
|
||||||
|
$v0 = $add($v0, ((($v1 << 4) + $k2[0]) ^ ($v1 + $sum) ^ (((($v1) & $MASK) >> 5) + $k2[1])) & $MASK);
|
||||||
|
$v1 = $add($v1, ((($v0 << 4) + $k2[2]) ^ ($v0 + $sum) ^ (((($v0) & $MASK) >> 5) + $k2[3])) & $MASK);
|
||||||
|
}
|
||||||
|
$re[$I * 2] = $v0 & $MASK;
|
||||||
|
$re[$I * 2 + 1] = $v1 & $MASK;
|
||||||
|
}
|
||||||
|
|
||||||
|
$re[0] = $rotr($re[0], $k2[0] % 16);
|
||||||
|
$re[0] = $rotl($re[0], $k2[2] % 16);
|
||||||
|
$re[0] = $rotl($re[0], $k2[0] % 16);
|
||||||
|
$re[0] = $rotr($re[0], $k2[2] % 16);
|
||||||
|
$re[0] = $rotl($re[0], $k2[2] % 16);
|
||||||
|
|
||||||
|
$re[1] = ($re[1] ^ $k2[1]) & $MASK;
|
||||||
|
$re[1] = $add($re[1], $k2[3]);
|
||||||
|
$re[1] = $add($re[1], $k2[1]);
|
||||||
|
$re[1] = ($re[1] ^ $k2[3]) & $MASK;
|
||||||
|
$re[1] = ($re[1] ^ $k2[3]) & $MASK;
|
||||||
|
|
||||||
|
$re[2] = $add($re[2], $k2[0]);
|
||||||
|
$re[2] = ($re[2] - $k2[2]) & $MASK;
|
||||||
|
$re[2] = ($re[2] - $k2[0]) & $MASK;
|
||||||
|
$re[2] = $add($re[2], $k2[2]);
|
||||||
|
$re[2] = $rotl($re[2], $k2[2] % 16);
|
||||||
|
|
||||||
|
$re[3] = $rotl($re[3], $k2[1] % 16);
|
||||||
|
$re[3] = $rotr($re[3], $k2[3] % 16);
|
||||||
|
$re[3] = $rotr($re[3], $k2[1] % 16);
|
||||||
|
$re[3] = ($re[3] - $k2[3]) & $MASK;
|
||||||
|
|
||||||
|
$re[0] = $add($re[0], $k2[0]);
|
||||||
|
$re[0] = $add($re[0], $k2[2]);
|
||||||
|
$re[0] = $rotl($re[0], $k2[2] % 16);
|
||||||
|
|
||||||
|
$re[1] = $rotr($re[1], $k2[1] % 16);
|
||||||
|
$re[1] = $rotl($re[1], $k2[3] % 16);
|
||||||
|
$re[1] = ($re[1] ^ $k2[3]) & $MASK;
|
||||||
|
|
||||||
|
$re[2] = $add($re[2], $k2[0]);
|
||||||
|
$re[2] = ($re[2] - $k2[2]) & $MASK;
|
||||||
|
$re[2] = $add($re[2], $k2[2]);
|
||||||
|
$re[2] = $rotr($re[2], $k2[2] % 16);
|
||||||
|
|
||||||
|
$re[3] = $rotl($re[3], $k2[1] % 16);
|
||||||
|
$re[3] = ($re[3] - $k2[3]) & $MASK;
|
||||||
|
$re[3] = $rotl($re[3], $k2[3] % 16);
|
||||||
|
|
||||||
|
$sign = bin2hex(pack('V*', $re[0], $re[1], $re[2], $re[3]));
|
||||||
|
|
||||||
|
return $sign;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,37 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace plugin\utility\videoparse\api;
|
||||||
|
|
||||||
|
use Exception;
|
||||||
|
use plugin\utility\videoparse\api;
|
||||||
|
|
||||||
|
class huya implements api
|
||||||
|
{
|
||||||
|
public function parse($url){
|
||||||
|
if(!preg_match('/\/(\d+).html/', $url, $match)) throw new Exception('视频id获取失败');
|
||||||
|
$id = $match[1];
|
||||||
|
$requrl = 'https://liveapi.huya.com/moment/getMomentContent?videoId=' . $id;
|
||||||
|
$res = get_curl($requrl, 0, 'https://v.huya.com/');
|
||||||
|
$arr = json_decode($res, true);
|
||||||
|
if(isset($arr['status']) && $arr['status'] == 200){
|
||||||
|
$url = $arr["data"]["moment"]["videoInfo"]["definitions"][0]["url"];
|
||||||
|
$cover = $arr["data"]["moment"]["videoInfo"]["videoCover"];
|
||||||
|
$title = $arr["data"]["moment"]["videoInfo"]["videoTitle"];
|
||||||
|
$avatarUrl = $arr["data"]["moment"]["videoInfo"]["avatarUrl"];
|
||||||
|
$author = $arr["data"]["moment"]["videoInfo"]["nickName"];
|
||||||
|
$time = date('Y-m-d H:i:s', $arr["data"]["moment"]["cTime"]);
|
||||||
|
$like = $arr["data"]["moment"]["favorCount"];
|
||||||
|
return [
|
||||||
|
'title' => $title,
|
||||||
|
'cover' => $cover,
|
||||||
|
'url' => $url,
|
||||||
|
'time' => $time,
|
||||||
|
'like' => $like,
|
||||||
|
'author' => $author,
|
||||||
|
'avatar' => $avatarUrl
|
||||||
|
];
|
||||||
|
}else{
|
||||||
|
throw new Exception('视频解析失败');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,43 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace plugin\utility\videoparse\api;
|
||||||
|
|
||||||
|
use Exception;
|
||||||
|
use plugin\utility\videoparse\api;
|
||||||
|
|
||||||
|
class kuaishou implements api
|
||||||
|
{
|
||||||
|
public function parse($url){
|
||||||
|
$url = 'https://api.makuo.cc/api/get.video.kuaishou?url='.urlencode($url);
|
||||||
|
$header = ['Authorization: '.config_get('yapi_token')];
|
||||||
|
$data = get_curl($url, 0, 0, 0, 0, 0, 0, $header);
|
||||||
|
$arr = json_decode($data, true);
|
||||||
|
if(isset($arr['code']) && $arr['code']==200){
|
||||||
|
if(isset($arr['data']['url'])){
|
||||||
|
return [
|
||||||
|
'title' => $arr['data']['title'],
|
||||||
|
'author' => $arr['data']['author'],
|
||||||
|
'avatar' => $arr['data']['avatar'],
|
||||||
|
'time' => date('Y-m-d H:i:s', intval($arr['data']['timestamp']/1000)),
|
||||||
|
'cover' => $arr['data']['cover'],
|
||||||
|
'url' => $arr['data']['url'],
|
||||||
|
];
|
||||||
|
}elseif(isset($arr['data']['images'])){
|
||||||
|
return [
|
||||||
|
'title' => $arr['data']['title'],
|
||||||
|
'author' => $arr['data']['author'],
|
||||||
|
'avatar' => $arr['data']['avatar'],
|
||||||
|
'time' => date('Y-m-d H:i:s', intval($arr['data']['timestamp']/1000)),
|
||||||
|
'cover' => $arr['data']['cover'],
|
||||||
|
'images' => $arr['data']['images'],
|
||||||
|
];
|
||||||
|
}else{
|
||||||
|
throw new Exception('解析url返回异常');
|
||||||
|
}
|
||||||
|
}elseif(isset($arr['msg'])){
|
||||||
|
throw new Exception('视频解析失败,'.$arr['msg']);
|
||||||
|
}else{
|
||||||
|
throw new Exception('视频解析失败');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,41 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace plugin\utility\videoparse\api;
|
||||||
|
|
||||||
|
use Exception;
|
||||||
|
use plugin\utility\videoparse\api;
|
||||||
|
|
||||||
|
class pipixia implements api
|
||||||
|
{
|
||||||
|
public function parse($url){
|
||||||
|
$url = 'https://api.makuo.cc/api/get.video.pipixia?url='.urlencode($url);
|
||||||
|
$header = ['Authorization: '.config_get('yapi_token')];
|
||||||
|
$data = get_curl($url, 0, 0, 0, 0, 0, 0, $header);
|
||||||
|
$arr = json_decode($data, true);
|
||||||
|
if(isset($arr['code']) && $arr['code']==200){
|
||||||
|
if(isset($arr['data']['url'])){
|
||||||
|
return [
|
||||||
|
'title' => $arr['data']['title'],
|
||||||
|
'author' => $arr['data']['author'],
|
||||||
|
'avatar' => $arr['data']['avatar'],
|
||||||
|
'cover' => $arr['data']['cover'],
|
||||||
|
'url' => $arr['data']['url'],
|
||||||
|
];
|
||||||
|
}elseif(isset($arr['data']['imgurl'])){
|
||||||
|
return [
|
||||||
|
'title' => $arr['data']['title'],
|
||||||
|
'author' => $arr['data']['author'],
|
||||||
|
'avatar' => $arr['data']['avatar'],
|
||||||
|
'cover' => $arr['data']['cover'],
|
||||||
|
'images' => $arr['data']['imgurl'],
|
||||||
|
];
|
||||||
|
}else{
|
||||||
|
throw new Exception('解析url返回异常');
|
||||||
|
}
|
||||||
|
}elseif(isset($arr['msg'])){
|
||||||
|
throw new Exception('视频解析失败,'.$arr['msg']);
|
||||||
|
}else{
|
||||||
|
throw new Exception('视频解析失败');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,34 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace plugin\utility\videoparse\api;
|
||||||
|
|
||||||
|
use Exception;
|
||||||
|
use plugin\utility\videoparse\api;
|
||||||
|
|
||||||
|
class qmkg implements api
|
||||||
|
{
|
||||||
|
public function parse($url){
|
||||||
|
if(!preg_match('/\?s=(.*)/', $url, $match)) throw new Exception('视频id获取失败');
|
||||||
|
$id = $match[1];
|
||||||
|
$requrl = 'https://kg.qq.com/node/play?s=' . $id;
|
||||||
|
$text = get_curl($requrl);
|
||||||
|
preg_match('/<title>(.*?)-(.*?)-/', $text, $video_title);
|
||||||
|
preg_match('/cover\":\"(.*?)\"/', $text, $video_cover);
|
||||||
|
preg_match('/playurl_video\":\"(.*?)\"/', $text, $video_url);
|
||||||
|
if(!isset($video_url[1]))preg_match('/playurl\":\"(.*?)\"/', $text, $video_url);
|
||||||
|
preg_match('/{\"activity_id\":0\,\"avatar\":\"(.*?)\"/', $text, $video_avatar);
|
||||||
|
preg_match('/<p class=\"singer_more__time\">(.*?)<\/p>/', $text, $video_time);
|
||||||
|
if (isset($video_url[1])) {
|
||||||
|
return [
|
||||||
|
'title' => $video_title[2],
|
||||||
|
'cover' => $video_cover[1],
|
||||||
|
'url' => $video_url[1],
|
||||||
|
'author' => $video_title[1],
|
||||||
|
'avatar' => $video_avatar[1],
|
||||||
|
'time' => $video_time[1],
|
||||||
|
];
|
||||||
|
}else{
|
||||||
|
throw new Exception('视频解析失败');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,47 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace plugin\utility\videoparse\api;
|
||||||
|
|
||||||
|
use Exception;
|
||||||
|
use plugin\utility\videoparse\api;
|
||||||
|
|
||||||
|
class toutiao implements api
|
||||||
|
{
|
||||||
|
public function parse($url){
|
||||||
|
if(preg_match('!/video\/(\d+)\/!', $url, $match)){
|
||||||
|
$id = $match[1];
|
||||||
|
$requrl = 'https://m.toutiao.com/video/' . $id . '/';
|
||||||
|
$ua = 'Mozilla/5.0 (Linux; Android 12; M2011K2C Build/SKQ1.211006.001) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/95.0.4638.74 Mobile Safari/537.36';
|
||||||
|
$res = get_curl($requrl, 0, 0, 0, 0, $ua);
|
||||||
|
if(preg_match('/<script id="RENDER_DATA" type="application\/json">(.*?)<\/script>/', $res, $match)){
|
||||||
|
$json = rawurldecode($match[1]);
|
||||||
|
$arr = json_decode($json, true);
|
||||||
|
if(isset($arr['articleInfo']['playAuthTokenV2'])){
|
||||||
|
$result = [
|
||||||
|
'title' => $arr['articleInfo']['title'],
|
||||||
|
'author' => $arr['articleInfo']['mediaUser']['screenName'],
|
||||||
|
'avatar' => $arr['articleInfo']['mediaUser']['avatarUrl'],
|
||||||
|
'time' => date('Y-m-d H:i:s', $arr['articleInfo']['publishTime']),
|
||||||
|
'cover' => $arr['articleInfo']['posterUrl'],
|
||||||
|
];
|
||||||
|
$playinfo = base64_decode($arr['articleInfo']['playAuthTokenV2']);
|
||||||
|
$playinfo = json_decode($playinfo, true);
|
||||||
|
if(isset($playinfo['GetPlayInfoToken'])){
|
||||||
|
$requrl = 'https://vod.bytedanceapi.com/?'.$playinfo['GetPlayInfoToken'];
|
||||||
|
$res = get_curl($requrl, 0, $url, 0, 0, $ua);
|
||||||
|
$arr = json_decode($res, true);
|
||||||
|
if(isset($arr['Result']['Data']['PlayInfoList']) && !empty($arr['Result']['Data']['PlayInfoList'])){
|
||||||
|
$playinfolist = $arr['Result']['Data']['PlayInfoList'];
|
||||||
|
array_multisort(array_column($playinfolist, 'Bitrate'), SORT_DESC, $playinfolist);
|
||||||
|
$result['url'] = $playinfolist[0]['MainPlayUrl'];
|
||||||
|
return $result;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
throw new Exception('视频解析失败');
|
||||||
|
}else{
|
||||||
|
throw new Exception('视频id获取失败');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,70 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace plugin\utility\videoparse\api;
|
||||||
|
|
||||||
|
use Exception;
|
||||||
|
use plugin\utility\videoparse\api;
|
||||||
|
|
||||||
|
class weibo implements api
|
||||||
|
{
|
||||||
|
public function parse($url, $retry = 0){
|
||||||
|
if(preg_match('/tv\/show\/([0-9:]+)/', $url, $matches) || preg_match('/fid=([0-9:]+)/', $url, $matches)){
|
||||||
|
$oid = $matches[1];
|
||||||
|
$page = '/tv/show/'.$oid;
|
||||||
|
$url = 'https://weibo.com/tv/api/component?page='.urlencode($page);
|
||||||
|
$post = 'data={"Component_Play_Playinfo":{"oid":"'.$oid.'"}}';
|
||||||
|
$referer = 'https://weibo.com/tv/show/'.$oid;
|
||||||
|
$cookie = cache('weibo_cookie');
|
||||||
|
if(!$cookie) $cookie = $this->genvisitor();
|
||||||
|
$data = get_curl($url, $post, $referer, $cookie);
|
||||||
|
$arr = json_decode($data, true);
|
||||||
|
if(isset($arr['code']) && $arr['code']=='100000'){
|
||||||
|
if(isset($arr['data']['Component_Play_Playinfo'])){
|
||||||
|
$info = $arr['data']['Component_Play_Playinfo'];
|
||||||
|
if(!empty($info['urls'])){
|
||||||
|
$hd_keys = ['超清 4K', '超清 2K', '高清 1080P', '高清 720P', '高清 480P'];
|
||||||
|
$play_url = null;
|
||||||
|
foreach($hd_keys as $key){
|
||||||
|
if(isset($info['urls'][$key])){
|
||||||
|
$play_url = $info['urls'][$key];
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if(!$play_url) $play_url = $info['urls'][array_key_first($info['urls'])];
|
||||||
|
$result = ['title'=>$info['title'], 'author'=>$info['author'], 'avatar'=>$info['avatar'], 'url'=>$play_url, 'cover'=>$info['cover_image'], 'time'=>date('Y-m-d H:i:s', $info['real_date']), 'duration'=>$info['duration']];
|
||||||
|
return $result;
|
||||||
|
}else{
|
||||||
|
throw new Exception('解析视频失败:视频地址不存在');
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
throw new Exception('解析视频失败:视频不存在');
|
||||||
|
}
|
||||||
|
}elseif(isset($arr['msg'])){
|
||||||
|
throw new Exception('解析视频失败:'.$arr['msg']);
|
||||||
|
}elseif(empty($data) && $retry = 0){
|
||||||
|
$this->genvisitor();
|
||||||
|
return $this->parse($url, 1);
|
||||||
|
}else{
|
||||||
|
throw new Exception('解析视频失败:接口请求失败');
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
throw new Exception('视频id获取失败');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private function genvisitor(){
|
||||||
|
$url = 'https://passport.weibo.com/visitor/genvisitor2';
|
||||||
|
$post = 'cb=visitor_gray_callback&tid=&from=weibo';
|
||||||
|
$referer = 'https://passport.weibo.com/visitor/visitor';
|
||||||
|
$data = get_curl($url, $post, $referer);
|
||||||
|
if(preg_match('/visitor_gray_callback\((.*?)\)/', $data, $matches)){
|
||||||
|
$arr = json_decode($matches[1], true);
|
||||||
|
if(isset($arr['retcode']) && $arr['retcode'] == 20000000){
|
||||||
|
$cookie = 'SUB='.$arr['data']['sub'].'; SUBP='.$arr['data']['subp'].';';
|
||||||
|
cache('weibo_cookie', $cookie);
|
||||||
|
return $cookie;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
throw new Exception('生成访客cookie失败');
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,41 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace plugin\utility\videoparse\api;
|
||||||
|
|
||||||
|
use Exception;
|
||||||
|
use plugin\utility\videoparse\api;
|
||||||
|
|
||||||
|
class weishi implements api
|
||||||
|
{
|
||||||
|
public function parse($url){
|
||||||
|
if(strpos($url,'feed/')){
|
||||||
|
$id = getSubstr($url,'feed/','/');
|
||||||
|
}else{
|
||||||
|
$id = getSubstr($url,'id=','&');
|
||||||
|
}
|
||||||
|
if(!$id) throw new Exception('视频id获取失败');
|
||||||
|
|
||||||
|
$requrl = 'https://h5.weishi.qq.com/webapp/json/weishi/WSH5GetPlayPage?feedid=' . $id;
|
||||||
|
$res = get_curl($requrl);
|
||||||
|
$arr = json_decode($res, true);
|
||||||
|
|
||||||
|
if(isset($arr['ret']) && $arr['ret'] == 0){
|
||||||
|
if(isset($arr['data']['feeds'][0]['video_url'])){
|
||||||
|
return [
|
||||||
|
'author' => $arr['data']['feeds'][0]['poster']['nick'],
|
||||||
|
'avatar' => $arr['data']['feeds'][0]['poster']['avatar'],
|
||||||
|
'time' => date('Y-m-d H:i:s', $arr['data']['feeds'][0]['poster']['createtime']),
|
||||||
|
'title' => $arr['data']['feeds'][0]['feed_desc_withat'],
|
||||||
|
'cover' => $arr['data']['feeds'][0]['images'][0]['url'],
|
||||||
|
'url' => $arr['data']['feeds'][0]['video_url']
|
||||||
|
];
|
||||||
|
}else{
|
||||||
|
throw new Exception('视频解析失败(地址获取失败)');
|
||||||
|
}
|
||||||
|
}elseif(isset($arr['msg'])){
|
||||||
|
throw new Exception('视频解析失败('.$arr['msg'].')');
|
||||||
|
}else{
|
||||||
|
throw new Exception('视频解析失败');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,48 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace plugin\utility\videoparse\api;
|
||||||
|
|
||||||
|
use Exception;
|
||||||
|
use think\helper\Str;
|
||||||
|
use plugin\utility\videoparse\api;
|
||||||
|
|
||||||
|
class xiaohongshu implements api
|
||||||
|
{
|
||||||
|
public function parse($url){
|
||||||
|
if(strpos($url, 'xhslink.com/')){
|
||||||
|
$url = get_location_url($url);
|
||||||
|
if(!$url || !strpos($url, 'xiaohongshu.com/')){
|
||||||
|
throw new Exception('短链接解析失败');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$data = get_curl($url);
|
||||||
|
if(preg_match('/window\.__INITIAL_STATE__=(.*?)<\/script>/', $data, $matches)){
|
||||||
|
$data = str_replace('undefined', 'null', $matches[1]);
|
||||||
|
$arr = json_decode($data, true);
|
||||||
|
if(isset($arr['note']['noteDetailMap']) && !empty($arr['note']['noteDetailMap'])){
|
||||||
|
$id = array_key_first($arr['note']['noteDetailMap']);
|
||||||
|
$info = $arr['note']['noteDetailMap'][$id]['note'];
|
||||||
|
$result = [
|
||||||
|
'type' => $info['type'],
|
||||||
|
'title' => $info['title'],
|
||||||
|
'desc' => $info['desc'],
|
||||||
|
'time' => date('Y-m-d H:i:s', intval($info['time']/1000)),
|
||||||
|
'author' => $info['user']['nickname'],
|
||||||
|
'avatar' => $info['user']['avatar'],
|
||||||
|
];
|
||||||
|
if($info['type'] == 'video'){
|
||||||
|
$result['cover'] = !empty($info['imageList']) ? $info['imageList'][0]['urlDefault'] : '';
|
||||||
|
$result['url'] = !empty($info['video']['media']['stream']['h264']) ? $info['video']['media']['stream']['h264'][0]['masterUrl'] : '';
|
||||||
|
}elseif($info['type'] == 'normal'){
|
||||||
|
$images = [];
|
||||||
|
foreach($info['imageList'] as $img){
|
||||||
|
$images[] = $img['urlDefault'];
|
||||||
|
}
|
||||||
|
$result['images'] = $images;
|
||||||
|
}
|
||||||
|
return $result;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
throw new Exception('视频解析失败');
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,33 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace plugin\utility\videoparse\api;
|
||||||
|
|
||||||
|
use Exception;
|
||||||
|
use plugin\utility\videoparse\api;
|
||||||
|
|
||||||
|
class zuiyou implements api
|
||||||
|
{
|
||||||
|
public function parse($url){
|
||||||
|
$url = 'https://api.makuo.cc/api/get.video.zuiyou?url='.urlencode($url);
|
||||||
|
$header = ['Authorization: '.config_get('yapi_token')];
|
||||||
|
$data = get_curl($url, 0, 0, 0, 0, 0, 0, $header);
|
||||||
|
$arr = json_decode($data, true);
|
||||||
|
if(isset($arr['code']) && $arr['code']==200){
|
||||||
|
if(isset($arr['data']['url'])){
|
||||||
|
return [
|
||||||
|
'title' => $arr['data']['title'],
|
||||||
|
'author' => $arr['data']['author'],
|
||||||
|
'avatar' => $arr['data']['avatar'],
|
||||||
|
'cover' => $arr['data']['cover'],
|
||||||
|
'url' => $arr['data']['url'],
|
||||||
|
];
|
||||||
|
}else{
|
||||||
|
throw new Exception('解析url返回异常');
|
||||||
|
}
|
||||||
|
}elseif(isset($arr['msg'])){
|
||||||
|
throw new Exception('视频解析失败,'.$arr['msg']);
|
||||||
|
}else{
|
||||||
|
throw new Exception('视频解析失败');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -28,10 +28,15 @@
|
|||||||
<tbody>
|
<tbody>
|
||||||
<tr><td class="query-title">视频标题</td><td class="query-result">{{result_info.title}}</td></tr>
|
<tr><td class="query-title">视频标题</td><td class="query-result">{{result_info.title}}</td></tr>
|
||||||
<tr v-show="result_info.desc"><td class="query-title">视频描述</td><td class="query-result">{{result_info.desc}}</td></tr>
|
<tr v-show="result_info.desc"><td class="query-title">视频描述</td><td class="query-result">{{result_info.desc}}</td></tr>
|
||||||
<tr v-show="result_info.author"><td class="query-title">视频作者</td><td class="query-result">{{result_info.author}}</tr>
|
<tr v-show="result_info.author"><td class="query-title">视频作者</td><td class="query-result">{{result_info.author}} <a v-show="result_info.avatar" :href="result_info.avatar" target="_blank" rel="noreferrer"><em class="icon ni ni-img"></em></a></tr>
|
||||||
<tr v-show="result_info.time"><td class="query-title">发布时间</td><td class="query-result">{{result_info.time}}</td></tr>
|
<tr v-show="result_info.time"><td class="query-title">发布时间</td><td class="query-result">{{result_info.time}}</td></tr>
|
||||||
<tr v-show="result_info.cover"><td class="query-title">视频封面</td><td class="query-result"><a :href="result_info.cover" class="btn btn-sm btn-outline-info" target="_blank" rel="noreferrer">点击查看</a> <a @click="copy(result_info.cover)" class="btn btn-sm btn-outline-warning" href="JavaScript:;">点此复制</a></td></tr>
|
<tr v-show="result_info.cover"><td class="query-title">视频封面</td><td class="query-result"><a :href="result_info.cover" class="btn btn-sm btn-outline-info" target="_blank" rel="noreferrer">点击查看</a> <a @click="copy(result_info.cover)" class="btn btn-sm btn-outline-warning" href="JavaScript:;">点此复制</a></td></tr>
|
||||||
<tr><td class="query-title">视频链接</td><td class="query-result"><a :href="result_info.url" class="btn btn-sm btn-outline-info" target="_blank" rel="noreferrer">点击查看</a> <a @click="copy(result_info.url)" class="btn btn-sm btn-outline-warning" href="JavaScript:;">点此复制</a></td></tr>
|
<tr v-show="result_info.url"><td class="query-title">视频链接</td><td class="query-result"><a :href="result_info.url" class="btn btn-sm btn-outline-info" target="_blank" rel="noreferrer">点击查看</a> <a @click="copy(result_info.url)" class="btn btn-sm btn-outline-warning" href="JavaScript:;">点此复制</a></td></tr>
|
||||||
|
<tr v-show="result_info.images"><td class="query-title">图片链接</td><td class="query-result">
|
||||||
|
<div v-for="(item, index) in result_info.images" :key="index" style="margin-bottom:5px;">
|
||||||
|
<a :href="item" class="btn btn-sm btn-outline-info" target="_blank" rel="noreferrer">图片{{index+1}}查看</a> <a @click="copy(item)" class="btn btn-sm btn-outline-warning" href="JavaScript:;">点此复制</a>
|
||||||
|
</div>
|
||||||
|
</td></tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
@@ -40,7 +45,7 @@
|
|||||||
<div class="card-inner">
|
<div class="card-inner">
|
||||||
<h6><em class="icon ni ni-info"></em> 工具说明</h6>
|
<h6><em class="icon ni ni-info"></em> 工具说明</h6>
|
||||||
<div class="accordion-inner">
|
<div class="accordion-inner">
|
||||||
<p>本工具可解析短视频去除水印的下载链接。<br/>目前已支持的视频平台:抖音、头条、西瓜、快手、微博、皮皮虾、小红书、微视、虎牙、秒拍、全民K歌、Acfun等</p>
|
<p>本工具可解析短视频去除水印的下载链接。<br/>已支持的视频平台:抖音、头条、快手、微博、小红书、微视、虎牙、全民K歌、Acfun等</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
+130
-29
@@ -21,8 +21,9 @@ class App extends Plugin
|
|||||||
|
|
||||||
public function query(){
|
public function query(){
|
||||||
$domain = input('post.domain', null, 'trim');
|
$domain = input('post.domain', null, 'trim');
|
||||||
|
$type = input('post.type', 'web', 'trim');
|
||||||
if(!$domain) return msg('error','no domain');
|
if(!$domain) return msg('error','no domain');
|
||||||
if(!checkdomain($domain)){
|
if(strpos($domain,'.') && !checkdomain($domain)){
|
||||||
return msg('error', '域名格式不正确!');
|
return msg('error', '域名格式不正确!');
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -31,48 +32,148 @@ class App extends Plugin
|
|||||||
return msg('error', '验证失败,请重新验证');
|
return msg('error', '验证失败,请重新验证');
|
||||||
}
|
}
|
||||||
|
|
||||||
$cache = Db::name('querycache')->where('type', 'icp')->where('key', $domain)->find();
|
$cache = Db::name('querycache')->where('type', $type.'list')->where('key|subkey', $domain)->find();
|
||||||
if($cache && time() - strtotime($cache['uptime']) <= self::CACHE_TIME){
|
if($cache && time() - strtotime($cache['uptime']) <= self::CACHE_TIME){
|
||||||
$array = json_decode($cache['content'], true);
|
$array = json_decode($cache['content'], true);
|
||||||
return msg('ok','success',$array);
|
$data = Db::name('querycache')->where('type', $type.'item')->whereIn('id', implode(',',$array['list']))->select();
|
||||||
|
$list = [];
|
||||||
|
foreach($data as $row){
|
||||||
|
$list[] = json_decode($row['content'], true);
|
||||||
|
}
|
||||||
|
return msg('ok','success',['total'=>$array['total'], 'list'=>$list]);
|
||||||
|
}
|
||||||
|
|
||||||
|
$cache = Db::name('querycache')->where('type', $type.'item')->where('key|subkey', $domain)->find();
|
||||||
|
if($cache && time() - strtotime($cache['uptime']) <= self::CACHE_TIME){
|
||||||
|
$array = json_decode($cache['content'], true);
|
||||||
|
return msg('ok','success',['total'=>1, 'list'=>[$array]]);
|
||||||
}
|
}
|
||||||
|
|
||||||
try{
|
try{
|
||||||
$result = $this->queryapi($domain);
|
$result = $this->execapi($type, $domain);
|
||||||
if(!$result){
|
|
||||||
return msg('ok','success',null);
|
|
||||||
}
|
|
||||||
}catch(Exception $e){
|
}catch(Exception $e){
|
||||||
return msg('error', $e->getMessage());
|
return msg('error', $e->getMessage());
|
||||||
}
|
}
|
||||||
|
|
||||||
Db::name('querycache')->duplicate([
|
if($result['total'] > 1 && count($result['data']) > 1){
|
||||||
'type' => 'icp',
|
$i = 0;
|
||||||
'key' => $result['Domain'],
|
foreach($result['data'] as $row){
|
||||||
'content' => json_encode($result),
|
$id = Db::name('querycache')->duplicate([
|
||||||
'uptime' => date('Y-m-d H:i:s')
|
'content' => json_encode($row),
|
||||||
])->insert([
|
'uptime' => date('Y-m-d H:i:s')
|
||||||
'type' => 'icp',
|
])->insertGetId([
|
||||||
'key' => $result['Domain'],
|
'type' => $type.'item',
|
||||||
'content' => json_encode($result),
|
'key' => $row['domain'],
|
||||||
'uptime' => date('Y-m-d H:i:s')
|
'subkey' => $row['webLicence'],
|
||||||
]);
|
'content' => json_encode($row),
|
||||||
|
'uptime' => date('Y-m-d H:i:s')
|
||||||
|
]);
|
||||||
|
$result['data'][$i++]['id'] = $id;
|
||||||
|
$ids[] = $id;
|
||||||
|
}
|
||||||
|
Db::name('querycache')->duplicate([
|
||||||
|
'content' => json_encode(['total'=>$result['total'], 'list'=>$ids]),
|
||||||
|
'uptime' => date('Y-m-d H:i:s')
|
||||||
|
])->insert([
|
||||||
|
'type' => $type.'list',
|
||||||
|
'key' => $domain == $result['data'][0]['domain'] ? $result['data'][0]['domain'] : $result['data'][0]['unitName'],
|
||||||
|
'subkey' => $domain == $result['data'][0]['domain'] ? $result['data'][0]['webLicence'] : $result['data'][0]['mainLicence'],
|
||||||
|
'content' => json_encode(['total'=>$result['total'], 'list'=>$ids]),
|
||||||
|
'uptime' => date('Y-m-d H:i:s')
|
||||||
|
]);
|
||||||
|
}elseif($result['total'] == 1 && count($result['data']) > 0){
|
||||||
|
$id = Db::name('querycache')->duplicate([
|
||||||
|
'content' => json_encode($result['data'][0]),
|
||||||
|
'uptime' => date('Y-m-d H:i:s')
|
||||||
|
])->insertGetId([
|
||||||
|
'type' => $type.'item',
|
||||||
|
'key' => $result['data'][0]['domain'],
|
||||||
|
'subkey' => $result['data'][0]['webLicence'],
|
||||||
|
'content' => json_encode($result['data'][0]),
|
||||||
|
'uptime' => date('Y-m-d H:i:s')
|
||||||
|
]);
|
||||||
|
$result['data'][0]['id'] = $id;
|
||||||
|
}
|
||||||
|
|
||||||
return msg('ok','success',$result);
|
return msg('ok','success',['total'=>$result['total'], 'list'=>$result['data']]);
|
||||||
}
|
}
|
||||||
|
|
||||||
private function queryapi($domain){
|
public function item(){
|
||||||
$url = config_get('qqapi_url').'api.php?act=icpquery';
|
$id = input('post.id');
|
||||||
$post = 'key='.config_get('qqapi_key').'&domain='.$domain;
|
if(!$id) return msg('error','no id');
|
||||||
$data = get_curl($url, $post);
|
$cache = Db::name('querycache')->where('id', $id)->find();
|
||||||
$arr = json_decode($data, true);
|
if($cache){
|
||||||
if(isset($arr['code']) && $arr['code']==0){
|
$array = json_decode($cache['content'], true);
|
||||||
return $arr['data'];
|
return msg('ok','success',['total'=>1, 'list'=>[$array]]);
|
||||||
}elseif(isset($arr['msg'])){
|
|
||||||
throw new Exception($arr['msg']);
|
|
||||||
}else{
|
}else{
|
||||||
throw new Exception('接口请求失败');
|
return msg('ok','success',['total'=>0, 'list'=>[]]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* https://github.com/HG-ha/ICP_Query
|
||||||
|
*/
|
||||||
|
private function execapi($type, $domain){
|
||||||
|
$url = 'http://172.17.0.1:16181/query/'.$type.'?search='.urlencode($domain);
|
||||||
|
$response = get_curl($url);
|
||||||
|
$arr = json_decode($response, true);
|
||||||
|
if(isset($arr['code']) && $arr['code']==200){
|
||||||
|
$list = [];
|
||||||
|
if(isset($arr['params']['list'])){
|
||||||
|
foreach($arr['params']['list'] as $row){
|
||||||
|
$list[] = ['domain'=>isset($row['domain'])?$row['domain']:$row['serviceName'], 'mainLicence'=>$row['mainLicence'], 'webLicence'=>$row['serviceLicence'], 'unitName'=>$row['unitName'], 'unitType'=>$row['natureName'], 'updateTime'=>$row['updateRecordTime'], 'contentTypeName'=>$row['contentTypeName']];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return ['code'=>0, 'total'=>isset($arr['params']['total']) ? $arr['params']['total'] : 0, 'data'=>$list];
|
||||||
|
}elseif(isset($arr['msg'])){
|
||||||
|
throw new Exception($arr['msg']);
|
||||||
|
}else{
|
||||||
|
throw new Exception('查询接口请求失败');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private function execapi2($domain){
|
||||||
|
$timeStamp = time();
|
||||||
|
$authKey = md5("testtest" . $timeStamp);
|
||||||
|
$referer = 'https://beian.miit.gov.cn/';
|
||||||
|
$headers = ['Origin: https://beian.miit.gov.cn'];
|
||||||
|
$url = 'https://hlwicpfwc.miit.gov.cn/icpproject_query/api/auth';
|
||||||
|
$post = 'authKey='.$authKey.'&timeStamp='.$timeStamp;
|
||||||
|
$response = get_curl($url, $post, $referer, 0, 1, 0, 0, $headers);
|
||||||
|
$body = substr($response, strpos($response, '{"'));
|
||||||
|
$arr = json_decode($body, true);
|
||||||
|
if(isset($arr['code']) && $arr['code']==200){
|
||||||
|
$cookie = '';
|
||||||
|
preg_match_all('/set-cookie: (.*?);/i', $response, $matchs);
|
||||||
|
foreach ($matchs[1] as $val) {
|
||||||
|
if(substr($val,-1)=='=')continue;
|
||||||
|
$cookie.=$val.'; ';
|
||||||
|
}
|
||||||
|
|
||||||
|
$token = $arr['params']['bussiness'];
|
||||||
|
|
||||||
|
$url = 'https://hlwicpfwc.miit.gov.cn/icpproject_query/api/icpAbbreviateInfo/queryByCondition';
|
||||||
|
$post = json_encode(['pageNum'=>'','pageSize'=>'','unitName'=>$domain,'serviceType'=>1]);
|
||||||
|
$headers[] = 'Content-Type: application/json; charset=UTF-8';
|
||||||
|
$headers[] = 'token: '.$token;
|
||||||
|
$response = get_curl($url, $post, $referer, $cookie, 0, 0, 0, $headers);
|
||||||
|
$arr = json_decode($response, true);
|
||||||
|
if(isset($arr['code']) && $arr['code']==200){
|
||||||
|
$list = [];
|
||||||
|
foreach($arr['params']['list'] as $row){
|
||||||
|
$list[] = ['domain'=>$row['domain'], 'mainLicence'=>$row['mainLicence'], 'webLicence'=>$row['serviceLicence'], 'unitName'=>$row['unitName'], 'unitType'=>$row['natureName'], 'updateTime'=>$row['updateRecordTime'], 'limitAccess'=>$row['limitAccess'], 'contentTypeName'=>$row['contentTypeName'], 'dataId'=>$row['dataId']];
|
||||||
|
}
|
||||||
|
return ['code'=>0, 'total'=>$arr['params']['total'], 'data'=>$list];
|
||||||
|
}elseif(isset($arr['msg'])){
|
||||||
|
throw new Exception($arr['msg']);
|
||||||
|
}else{
|
||||||
|
throw new Exception('查询接口(query)请求失败');
|
||||||
|
}
|
||||||
|
|
||||||
|
}elseif(isset($arr['msg'])){
|
||||||
|
throw new Exception($arr['msg']);
|
||||||
|
}else{
|
||||||
|
throw new Exception('查询接口(auth)请求失败');
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
+93
-25
@@ -2,19 +2,33 @@
|
|||||||
{block name="title"}{$plugin.title} - {:config_get('title')}{/block}
|
{block name="title"}{$plugin.title} - {:config_get('title')}{/block}
|
||||||
{block name="main"}
|
{block name="main"}
|
||||||
<style>
|
<style>
|
||||||
td{text-align: center;}
|
.query-title {
|
||||||
|
text-align: right;
|
||||||
|
}
|
||||||
|
.table-title th{word-break: keep-all;}
|
||||||
</style>
|
</style>
|
||||||
<div class="container-xl" id="app">
|
<div class="container-xl" id="app">
|
||||||
<div class="col-sm-12 col-md-10 col-xl-8 center-block">
|
<div class="col-md-12 col-xl-10 center-block">
|
||||||
<div class="card card-preview">
|
<div class="card card-preview">
|
||||||
<div class="card-inner mt-3">
|
<div class="card-inner mt-3">
|
||||||
<div class="nya-title nk-ibx-action-item progress-rating">
|
<div class="nya-title nk-ibx-action-item progress-rating">
|
||||||
<span class="nk-menu-text font-weight-bold">ICP备案查询</span>
|
<span class="nk-menu-text font-weight-bold">ICP备案查询</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group row">
|
||||||
<label class="form-label">输入域名:</label>
|
<div class="col-12 col-sm-4 col-md-3">
|
||||||
|
<label class="form-label">查询类型:</label>
|
||||||
|
<select id="query-type" class="form-control form-control-lg" v-model="query_type">
|
||||||
|
<option value="web">域名</option>
|
||||||
|
<option value="app">App</option>
|
||||||
|
<option value="mapp">小程序</option>
|
||||||
|
<option value="kapp">快应用</option>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
<div class="col-12 col-sm-8 col-md-9 mt-3 mt-sm-0">
|
||||||
|
<label class="form-label">查询内容:</label>
|
||||||
<div class="form-control-wrap">
|
<div class="form-control-wrap">
|
||||||
<input type="text" v-model="input" placeholder="请输入域名查询,请勿使用子域名或者带http://www等字符的网址查询" class="form-control form-control-lg" @keyup.enter="query" ref="input" autocomplete="off">
|
<input type="text" v-model="input" placeholder="请输入域名、程序名称、备案主体或备案号" class="form-control form-control-lg" @keyup.enter="query" ref="input" autocomplete="off">
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<button class="btn btn-dim btn-outline-primary btn-block card-link mb-3" @click="query" :disabled="query_disabled">
|
<button class="btn btn-dim btn-outline-primary btn-block card-link mb-3" @click="query" :disabled="query_disabled">
|
||||||
@@ -27,20 +41,47 @@ td{text-align: center;}
|
|||||||
<div class="nya-title nk-ibx-action-item progress-rating">
|
<div class="nya-title nk-ibx-action-item progress-rating">
|
||||||
<span class="nk-menu-text font-weight-bold">查询结果</span>
|
<span class="nk-menu-text font-weight-bold">查询结果</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="alert alert-warning text-center" v-if="result_code==0"><h6><em class="icon ni ni-info"></em> 没有查询到备案信息</h6></div>
|
<div class="alert alert-warning text-center" v-if="result_total==0"><h6><em class="icon ni ni-info"></em> 没有查询到备案记录</h6></div>
|
||||||
<div class="col-sm-12 col-md-10 col-xl-8 center-block" v-if="result_code==1">
|
<div v-if="result_total==1">
|
||||||
|
<h6>域名 <span class="text-primary">{{result_info.domain}}</span> 的信息:</h6>
|
||||||
<div class="table-responsive">
|
<div class="table-responsive">
|
||||||
<table class="table table-hover table-bordered">
|
<table class="table table-hover table-bordered">
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr><td class="query-title">域名</td><td>{{result_info.Domain}}</td></tr>
|
<tr><td class="query-title">{{service_name}}</td><td>{{result_info.domain}}</td></tr>
|
||||||
<tr><td class="query-title">备案号</td><td>{{result_info.DomainIcpNum}}</td></tr>
|
<tr><td class="query-title">ICP备案/许可证号</td><td>{{result_info.webLicence}}</td></tr>
|
||||||
<tr><td class="query-title">主办单位名称</td><td>{{result_info.CompanyName}}</td></tr>
|
<tr><td class="query-title">主办单位名称</td><td>{{result_info.unitName}}</td></tr>
|
||||||
<tr><td class="query-title">主办单位性质</td><td>{{result_info.CompanyType}}</td></tr>
|
<tr><td class="query-title">主办单位性质</td><td>{{result_info.unitType}}</td></tr>
|
||||||
<tr><td class="query-title">审核日期</td><td>{{result_info.AuditTime}}</td></tr>
|
<tr><td class="query-title">审核日期</td><td>{{result_info.updateTime}}</td></tr>
|
||||||
</tbody>
|
<tr><td class="query-title">网站前置审批项</td><td>{{result_info.contentTypeName}}</td></tr>
|
||||||
</table>
|
</tbody>
|
||||||
|
</table>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div v-if="result_total>1">
|
||||||
|
<h6><span class="text-primary">{{result_input}}</span> 共查询到 <span class="text-primary">{{result_total}}</span> 条备案信息:</h6>
|
||||||
|
<div class="table-responsive">
|
||||||
|
<table class="table table-hover table-bordered">
|
||||||
|
<thead class="table-title">
|
||||||
|
<th>{{service_name}}</th><th>ICP备案/许可证号</th><th>主办单位名称</th><th>审核日期</th><th>操作</th>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<tr v-for="(item,index) in result_list" :key="index">
|
||||||
|
<td>{{item.domain}}</td><td>{{item.webLicence}}</td><td>{{item.unitName}}</td><td>{{item.updateTime}}</td><td><button class="btn btn-dim btn-outline-info btn-xs" @click="show_item(index)">详情</button></td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
<p v-if="result_total>10" class="text-info">当前只支持查询最新10条记录,剩余记录请使用域名或程序名称进行精确查询。</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="card card-preview">
|
||||||
|
<div class="card-inner">
|
||||||
|
<h6><em class="icon ni ni-info"></em> 简介</h6>
|
||||||
|
<div class="accordion-inner">
|
||||||
|
<p>支持输入域名、程序名称、网站备案号、主体备案号、单位名称(个人姓名、企业名称)进行查询</p>
|
||||||
|
<p>此ICP查询工具直接对接工信部官网,非第三方接口。采用开源项目<a href="https://github.com/HG-ha/ICP_Query" target="_blank">ICP_Query</a></p>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -55,9 +96,22 @@ new Vue({
|
|||||||
data: {
|
data: {
|
||||||
query_disabled: true,
|
query_disabled: true,
|
||||||
input: '',
|
input: '',
|
||||||
|
query_type: 'web',
|
||||||
|
result_input: '',
|
||||||
showresult: false,
|
showresult: false,
|
||||||
result_info: [],
|
result_info: {
|
||||||
result_code: 0,
|
id: '',
|
||||||
|
domain: '',
|
||||||
|
mainLicence: '',
|
||||||
|
webLicence: '',
|
||||||
|
unitName: '',
|
||||||
|
unitType: '',
|
||||||
|
updateTime: '',
|
||||||
|
contentTypeName: '',
|
||||||
|
},
|
||||||
|
service_name: '网站域名',
|
||||||
|
result_list: [],
|
||||||
|
result_total: 0,
|
||||||
captcha: null
|
captcha: null
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
@@ -83,7 +137,7 @@ new Vue({
|
|||||||
layer.closeAll();
|
layer.closeAll();
|
||||||
return alert('请先完成验证');
|
return alert('请先完成验证');
|
||||||
}
|
}
|
||||||
var data = {domain: that.input};
|
var data = {domain: that.input, type: that.query_type};
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: '/api/{$plugin.alias}/query',
|
url: '/api/{$plugin.alias}/query',
|
||||||
type: 'post',
|
type: 'post',
|
||||||
@@ -93,12 +147,22 @@ new Vue({
|
|||||||
success: function (data) {
|
success: function (data) {
|
||||||
layer.closeAll();
|
layer.closeAll();
|
||||||
if(data.status=='ok'){
|
if(data.status=='ok'){
|
||||||
|
var data = data.data;
|
||||||
|
that.result_input = that.input;
|
||||||
that.showresult = true;
|
that.showresult = true;
|
||||||
if(data.data == null){
|
that.result_total = data.total;
|
||||||
that.result_code = 0;
|
that.result_list = data.list;
|
||||||
}else{
|
if(data.list.length > 0){
|
||||||
that.result_code = 1;
|
that.result_info = data.list[0];
|
||||||
that.result_info = data.data;
|
}
|
||||||
|
if(that.query_type=='web' || that.query_type=='bweb'){
|
||||||
|
that.service_name = '网站域名';
|
||||||
|
}else if(that.query_type=='app' || that.query_type=='bapp'){
|
||||||
|
that.service_name = 'App名称';
|
||||||
|
}else if(that.query_type=='mapp' || that.query_type=='bmapp'){
|
||||||
|
that.service_name = '小程序名称';
|
||||||
|
}else if(that.query_type=='kapp' || that.query_type=='bkapp'){
|
||||||
|
that.service_name = '快应用名称';
|
||||||
}
|
}
|
||||||
captcha.reset();
|
captcha.reset();
|
||||||
}else{
|
}else{
|
||||||
@@ -140,11 +204,15 @@ new Vue({
|
|||||||
},
|
},
|
||||||
query() {
|
query() {
|
||||||
this.checkURL();
|
this.checkURL();
|
||||||
if(this.input.trim() == ''){
|
if(this.input == ''){
|
||||||
alert('查询内容不能为空');return;
|
alert('查询内容不能为空');return;
|
||||||
}
|
}
|
||||||
layer.load(0, {shade:0.1});
|
layer.load(0, {shade:0.1});
|
||||||
this.captcha.showCaptcha();
|
this.captcha.showCaptcha();
|
||||||
|
},
|
||||||
|
show_item(index){
|
||||||
|
this.result_info = this.result_list[index];
|
||||||
|
this.result_total = 1;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -6,13 +6,19 @@
|
|||||||
namespace plugin\web\whois;
|
namespace plugin\web\whois;
|
||||||
|
|
||||||
use app\Plugin;
|
use app\Plugin;
|
||||||
|
use think\facade\Db;
|
||||||
|
use Iodev\Whois\Factory;
|
||||||
|
use Iodev\Whois\Exceptions\ConnectionException;
|
||||||
|
use Iodev\Whois\Exceptions\ServerMismatchException;
|
||||||
|
use Iodev\Whois\Exceptions\WhoisException;
|
||||||
use Exception;
|
use Exception;
|
||||||
|
|
||||||
class App extends Plugin
|
class App extends Plugin
|
||||||
{
|
{
|
||||||
|
const CACHE_TIME = 172800;
|
||||||
|
|
||||||
// https://help.aliyun.com/document_detail/35793.html
|
// https://help.aliyun.com/document_detail/35793.html
|
||||||
const status_name = ['ok'=>'正常状态', 'addPeriod'=>'域名新注册期', 'clientDeleteProhibited'=>'注册商设置禁止删除', 'serverDeleteProhibited'=>'注册局设置禁止删除', 'clientUpdateProhibited'=>'注册商设置禁止更新', 'serverUpdateProhibited'=>'注册局设置禁止更新', 'clientTransferProhibited'=>'注册商设置禁止转移', 'serverTransferProhibited'=>'注册局设置禁止转移', 'pendingVerification'=>'注册信息审核期', 'clientHold'=>'注册商设置暂停解析', 'serverHold'=>'注册局设置暂停解析', 'inactive'=>'非激活状态', 'clientRenewProhibited'=>'注册商设置禁止续费', 'serverRenewProhibited'=>'注册局设置禁止续费', 'pendingTransfer'=>'转移过程中', 'redemptionPeriod'=>'赎回期', 'pendingDelete'=>'待删除'];
|
const status_name = ['ok'=>'正常状态', 'active'=>'正常状态', 'addPeriod'=>'域名新注册期', 'clientDeleteProhibited'=>'注册商设置禁止删除', 'serverDeleteProhibited'=>'注册局设置禁止删除', 'clientUpdateProhibited'=>'注册商设置禁止更新', 'serverUpdateProhibited'=>'注册局设置禁止更新', 'clientTransferProhibited'=>'注册商设置禁止转移', 'serverTransferProhibited'=>'注册局设置禁止转移', 'pendingVerification'=>'注册信息审核期', 'clientHold'=>'注册商设置暂停解析', 'serverHold'=>'注册局设置暂停解析', 'inactive'=>'非激活状态', 'clientRenewProhibited'=>'注册商设置禁止续费', 'serverRenewProhibited'=>'注册局设置禁止续费', 'pendingTransfer'=>'转移过程中', 'redemptionPeriod'=>'赎回期', 'pendingDelete'=>'待删除'];
|
||||||
|
|
||||||
public function index()
|
public function index()
|
||||||
{
|
{
|
||||||
@@ -35,13 +41,58 @@ class App extends Plugin
|
|||||||
return msg('error', '验证失败,请重新验证');
|
return msg('error', '验证失败,请重新验证');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(self::CACHE_TIME > 0){
|
||||||
|
$cache = Db::name('querycache')->where('type', 'whois')->where('key', $domain)->find();
|
||||||
|
if($cache && time() - strtotime($cache['uptime']) <= self::CACHE_TIME){
|
||||||
|
$array = json_decode($cache['content'], true);
|
||||||
|
return msg('ok','success',$array);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
$url = 'https://whois.aite.xyz/?ajax&domain='.urlencode($domain);
|
try {
|
||||||
$data = get_curl($url,0,'https://whois.aite.xyz/');
|
$whois = Factory::get()->createWhois();
|
||||||
if(!$data) return msg('error', '查询失败,接口返回内容错误');
|
$info = $whois->loadDomainInfo($domain);
|
||||||
|
} catch (ConnectionException $e) {
|
||||||
|
return msg('error', '查询失败,Whois服务器连接失败');
|
||||||
|
} catch (ServerMismatchException $e) {
|
||||||
|
return msg('error', '查询失败,Whois服务器不存在');
|
||||||
|
} catch (WhoisException $e) {
|
||||||
|
return msg('error', '查询失败,'.$e->getMessage());
|
||||||
|
}
|
||||||
|
if(!$info){
|
||||||
|
return msg('ok','success',null);
|
||||||
|
}
|
||||||
|
|
||||||
if(strpos($data,'For more information on')){
|
$data = ['domainName'=>$info->domainName, 'whoisServer'=>$info->whoisServer, 'creationDate'=>$info->creationDate ? date('Y-m-d H:i:s', $info->creationDate) : null, 'expirationDate'=>$info->expirationDate ? date('Y-m-d H:i:s', $info->expirationDate) : null, 'updatedDate'=>$info->updatedDate ? date('Y-m-d H:i:s', $info->updatedDate) : $info->updatedDate, 'nameServers'=>$info->nameServers, 'states'=>$info->states, 'owner'=>$info->owner, 'registrar'=>$info->registrar, 'dnssec'=>$info->dnssec, 'rawData'=>$info->getResponse()->text];
|
||||||
$data = substr($data, 0, strpos($data,'For more information on'));
|
|
||||||
|
if(strpos($data['rawData'],'For more information on')){
|
||||||
|
$data['rawData'] = substr($data['rawData'], 0, strpos($data['rawData'],'For more information on'));
|
||||||
|
}
|
||||||
|
|
||||||
|
$status_name = array_change_key_case(self::status_name, CASE_LOWER);
|
||||||
|
if(!empty($data['states'])){
|
||||||
|
$status = [];
|
||||||
|
foreach($data['states'] as $state){
|
||||||
|
$name = null;
|
||||||
|
$key = str_replace(' ', '', strtolower($state));
|
||||||
|
if(isset($status_name[$key]))
|
||||||
|
$name = $status_name[$key];
|
||||||
|
if(!$name) {$name = $state;$state = null;}
|
||||||
|
$status[] = ['value'=>$state, 'name'=>$name];
|
||||||
|
}
|
||||||
|
$data['states'] = $status;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(self::CACHE_TIME > 0){
|
||||||
|
Db::name('querycache')->duplicate([
|
||||||
|
'content' => json_encode($data),
|
||||||
|
'uptime' => date('Y-m-d H:i:s')
|
||||||
|
])->insertGetId([
|
||||||
|
'type' => 'whois',
|
||||||
|
'key' => $domain,
|
||||||
|
'content' => json_encode($data),
|
||||||
|
'uptime' => date('Y-m-d H:i:s')
|
||||||
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
return msg('ok','success',$data);
|
return msg('ok','success',$data);
|
||||||
|
|||||||
@@ -5,6 +5,27 @@
|
|||||||
.query-title {
|
.query-title {
|
||||||
text-align: right;
|
text-align: right;
|
||||||
}
|
}
|
||||||
|
.whois-badge {
|
||||||
|
display: block;
|
||||||
|
padding: 3px 10px;
|
||||||
|
margin: 3px 0 3px 0;
|
||||||
|
background: #f0f4ff;
|
||||||
|
color: #364a63;
|
||||||
|
border-radius: 4px;
|
||||||
|
font-size: 13px;
|
||||||
|
}
|
||||||
|
.whois-raw-data {
|
||||||
|
background: #f5f6fa;
|
||||||
|
border-radius: 4px;
|
||||||
|
padding: 15px;
|
||||||
|
white-space: pre-wrap;
|
||||||
|
word-break: break-all;
|
||||||
|
font-size: 13px;
|
||||||
|
line-height: 1.6;
|
||||||
|
color: #364a63;
|
||||||
|
max-height: 400px;
|
||||||
|
overflow-y: auto;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
<div class="container-xl" id="app">
|
<div class="container-xl" id="app">
|
||||||
<div class="col-sm-12 col-md-10 col-xl-8 center-block">
|
<div class="col-sm-12 col-md-10 col-xl-8 center-block">
|
||||||
@@ -29,7 +50,24 @@
|
|||||||
<div class="nya-title nk-ibx-action-item progress-rating">
|
<div class="nya-title nk-ibx-action-item progress-rating">
|
||||||
<span class="nk-menu-text font-weight-bold">查询结果</span>
|
<span class="nk-menu-text font-weight-bold">查询结果</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="border p-2" v-html="result_info" style="white-space: nowrap;overflow-x: scroll;word-break: break-all;">
|
<div class="alert alert-warning text-center" v-if="!result_info"><h6><em class="icon ni ni-info"></em> 没有查询到该域名Whois信息</h6></div>
|
||||||
|
<div class="col-sm-12 col-md-10 col-xl-8 center-block" v-if="result_info">
|
||||||
|
<div class="table-responsive">
|
||||||
|
<table class="table table-hover table-bordered">
|
||||||
|
<tbody>
|
||||||
|
<tr><td class="query-title">域名</td><td>{{whoisData.domainName}}</td></tr>
|
||||||
|
<tr><td class="query-title">域名所有者</td><td>{{whoisData.owner || '-'}}</td></tr>
|
||||||
|
<tr><td class="query-title">注册商</td><td>{{whoisData.registrar}}</td></tr>
|
||||||
|
<tr><td class="query-title">Whois服务器</td><td>{{whoisData.whoisServer}}</td></tr>
|
||||||
|
<tr><td class="query-title">注册时间</td><td>{{whoisData.creationDate}}</td></tr>
|
||||||
|
<tr><td class="query-title">到期时间</td><td>{{whoisData.expirationDate}}</td></tr>
|
||||||
|
<tr><td class="query-title">更新时间</td><td>{{whoisData.updatedDate}}</td></tr>
|
||||||
|
<tr><td class="query-title">域名状态</td><td><div v-for="(item, index) in whoisData.states" :key="index">{{item.name}}<span class="text-muted" v-if="item.value">({{item.value}})</span></div></td></tr>
|
||||||
|
<tr><td class="query-title">DNS服务器</td><td><span class="whois-badge" v-for="(ns, index) in whoisData.nameServers" :key="index">{{ns}}</span></td></tr>
|
||||||
|
<tr><td class="query-title">原始信息</td><td class="whois-raw-data">{{whoisData.rawData}}</td></tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -46,7 +84,21 @@ new Vue({
|
|||||||
query_disabled: true,
|
query_disabled: true,
|
||||||
input: '',
|
input: '',
|
||||||
showresult: false,
|
showresult: false,
|
||||||
result_info: '',
|
result_info: false,
|
||||||
|
whoisData: {
|
||||||
|
cacheTime: '',
|
||||||
|
domainName: '',
|
||||||
|
whoisServer: '',
|
||||||
|
creationDate: '',
|
||||||
|
expirationDate: '',
|
||||||
|
updatedDate: '',
|
||||||
|
nameServers: [],
|
||||||
|
states: [],
|
||||||
|
owner: '',
|
||||||
|
registrar: '',
|
||||||
|
dnssec: '',
|
||||||
|
rawData: '',
|
||||||
|
},
|
||||||
captcha: null
|
captcha: null
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
@@ -82,8 +134,28 @@ new Vue({
|
|||||||
success: function (data) {
|
success: function (data) {
|
||||||
layer.closeAll();
|
layer.closeAll();
|
||||||
if(data.status=='ok'){
|
if(data.status=='ok'){
|
||||||
|
if(data.data == null){
|
||||||
|
that.result_info = false;
|
||||||
|
that.showresult = true;
|
||||||
|
captcha.reset();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
that.result_info = true;
|
||||||
|
that.whoisData = {
|
||||||
|
cacheTime: data.data.cacheTime || '',
|
||||||
|
domainName: data.data.domainName || '',
|
||||||
|
whoisServer: data.data.whoisServer || '',
|
||||||
|
creationDate: data.data.creationDate || '',
|
||||||
|
expirationDate: data.data.expirationDate || '',
|
||||||
|
updatedDate: data.data.updatedDate || '',
|
||||||
|
nameServers: Array.isArray(data.data.nameServers) ? data.data.nameServers : [],
|
||||||
|
states: Array.isArray(data.data.states) ? data.data.states : [],
|
||||||
|
owner: data.data.owner !== undefined ? data.data.owner : '',
|
||||||
|
registrar: data.data.registrar || '',
|
||||||
|
dnssec: data.data.dnssec || '',
|
||||||
|
rawData: data.data.rawData || '',
|
||||||
|
};
|
||||||
that.showresult = true;
|
that.showresult = true;
|
||||||
that.result_info = data.data;
|
|
||||||
captcha.reset();
|
captcha.reset();
|
||||||
}else{
|
}else{
|
||||||
alert(data.message);
|
alert(data.message);
|
||||||
|
|||||||
@@ -49,16 +49,32 @@ class App extends Plugin
|
|||||||
}
|
}
|
||||||
|
|
||||||
private function queryapi($uin){
|
private function queryapi($uin){
|
||||||
$url = config_get('qqapi_url').'api.php?act=getqqlevel';
|
if(config_get('qqapi_url')){
|
||||||
$post = 'key='.config_get('qqapi_key').'&uin='.$uin;
|
$url = config_get('qqapi_url').'api.php?act=getqqlevel';
|
||||||
$data = get_curl($url, $post);
|
$post = 'key='.config_get('qqapi_key').'&uin='.$uin;
|
||||||
$arr = json_decode($data, true);
|
$data = get_curl($url, $post);
|
||||||
if(isset($arr['code']) && $arr['code']==0){
|
$arr = json_decode($data, true);
|
||||||
return $arr['data'];
|
if(isset($arr['code']) && $arr['code']==0){
|
||||||
}elseif(isset($arr['msg'])){
|
return $arr['data'];
|
||||||
throw new Exception($arr['msg']);
|
}elseif(isset($arr['msg'])){
|
||||||
|
throw new Exception($arr['msg']);
|
||||||
|
}else{
|
||||||
|
throw new Exception('接口请求失败');
|
||||||
|
}
|
||||||
|
}elseif(config_get('yapi_token')){
|
||||||
|
$url = 'https://api.makuo.cc/api/get.qq.level?qq='.$uin;
|
||||||
|
$header = ['Authorization: '.config_get('yapi_token')];
|
||||||
|
$data = get_curl($url, 0, 0, 0, 0, 0, 0, $header);
|
||||||
|
$arr = json_decode($data, true);
|
||||||
|
if(isset($arr['code']) && $arr['code']==200){
|
||||||
|
return $arr['data'];
|
||||||
|
}elseif(isset($arr['msg'])){
|
||||||
|
throw new Exception('接口请求失败,'.$arr['msg']);
|
||||||
|
}else{
|
||||||
|
throw new Exception('接口请求失败');
|
||||||
|
}
|
||||||
}else{
|
}else{
|
||||||
throw new Exception('接口请求失败');
|
throw new Exception('请先配置API接口参数');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -125,6 +125,13 @@
|
|||||||
<input type="text" name="captcha_key" placeholder="请输入极验KEY" class="layui-input">
|
<input type="text" name="captcha_key" placeholder="请输入极验KEY" class="layui-input">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<blockquote class="layui-elem-quote"><a href="https://api.makuo.cc/" target="_blank">Yapi接口</a>配置(配置了此密钥就可不用填写下方QQ-API配置)</blockquote>
|
||||||
|
<div class="layui-form-item">
|
||||||
|
<label class="layui-form-label">API Token:</label>
|
||||||
|
<div class="layui-input-block">
|
||||||
|
<input type="text" name="yapi_token" placeholder="请输入API Token" class="layui-input">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<blockquote class="layui-elem-quote"><a href="https://github.com/netcccyun/qqapi" target="_blank">QQ-API</a>接口配置(ICP备案查询、QQ等级查询等工具使用)</blockquote>
|
<blockquote class="layui-elem-quote"><a href="https://github.com/netcccyun/qqapi" target="_blank">QQ-API</a>接口配置(ICP备案查询、QQ等级查询等工具使用)</blockquote>
|
||||||
<div class="layui-form-item">
|
<div class="layui-form-item">
|
||||||
<label class="layui-form-label">接口地址:</label>
|
<label class="layui-form-label">接口地址:</label>
|
||||||
|
|||||||
+7
-2
@@ -8,9 +8,14 @@
|
|||||||
// +----------------------------------------------------------------------
|
// +----------------------------------------------------------------------
|
||||||
// | Author: liu21st <[email protected]>
|
// | Author: liu21st <[email protected]>
|
||||||
// +----------------------------------------------------------------------
|
// +----------------------------------------------------------------------
|
||||||
// [ 应用入口文件 ]
|
|
||||||
namespace think;
|
|
||||||
|
|
||||||
|
use think\App;
|
||||||
|
|
||||||
|
if (version_compare(PHP_VERSION, '8.0.0', '<')) {
|
||||||
|
die('require PHP >= 8.0 !');
|
||||||
|
}
|
||||||
|
|
||||||
|
// [ 应用入口文件 ]
|
||||||
require __DIR__ . '/../vendor/autoload.php';
|
require __DIR__ . '/../vendor/autoload.php';
|
||||||
|
|
||||||
// 执行HTTP应用并响应
|
// 执行HTTP应用并响应
|
||||||
|
|||||||
@@ -0,0 +1,19 @@
|
|||||||
|
<?php
|
||||||
|
// +----------------------------------------------------------------------
|
||||||
|
// | ThinkPHP [ WE CAN DO IT JUST THINK ]
|
||||||
|
// +----------------------------------------------------------------------
|
||||||
|
// | Copyright (c) 2006~2019 http://thinkphp.cn All rights reserved.
|
||||||
|
// +----------------------------------------------------------------------
|
||||||
|
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
|
||||||
|
// +----------------------------------------------------------------------
|
||||||
|
// | Author: liu21st <[email protected]>
|
||||||
|
// +----------------------------------------------------------------------
|
||||||
|
// $Id$
|
||||||
|
|
||||||
|
if (is_file($_SERVER["DOCUMENT_ROOT"] . $_SERVER["SCRIPT_NAME"])) {
|
||||||
|
return false;
|
||||||
|
} else {
|
||||||
|
$_SERVER["SCRIPT_FILENAME"] = __DIR__ . '/index.php';
|
||||||
|
|
||||||
|
require __DIR__ . "/index.php";
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user