Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
268328b2ac | ||
|
|
bc64066301 | ||
|
|
f5a6c11dda |
@@ -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);
|
||||||
|
|||||||
Generated
+1015
@@ -0,0 +1,1015 @@
|
|||||||
|
{
|
||||||
|
"_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": "90b52d33a495d2606004dc98c6c983ae",
|
||||||
|
"packages": [
|
||||||
|
{
|
||||||
|
"name": "cccyun/think-captcha",
|
||||||
|
"version": "3.0.11",
|
||||||
|
"source": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/netcccyun/think-captcha.git",
|
||||||
|
"reference": "40012811bf27b41011b1b60bcfadf16ad339931c"
|
||||||
|
},
|
||||||
|
"dist": {
|
||||||
|
"type": "zip",
|
||||||
|
"url": "https://api.github.com/repos/netcccyun/think-captcha/zipball/40012811bf27b41011b1b60bcfadf16ad339931c",
|
||||||
|
"reference": "40012811bf27b41011b1b60bcfadf16ad339931c",
|
||||||
|
"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.11"
|
||||||
|
},
|
||||||
|
"time": "2025-04-26T08:37:18+00:00"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "khanamiryan/qrcode-detector-decoder",
|
||||||
|
"version": "1.0.5.2",
|
||||||
|
"source": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/khanamiryan/php-qrcode-detector-decoder.git",
|
||||||
|
"reference": "04fdd58d86a387065f707dc6d3cc304c719910c1"
|
||||||
|
},
|
||||||
|
"dist": {
|
||||||
|
"type": "zip",
|
||||||
|
"url": "https://api.github.com/repos/khanamiryan/php-qrcode-detector-decoder/zipball/04fdd58d86a387065f707dc6d3cc304c719910c1",
|
||||||
|
"reference": "04fdd58d86a387065f707dc6d3cc304c719910c1",
|
||||||
|
"shasum": ""
|
||||||
|
},
|
||||||
|
"require": {
|
||||||
|
"php": ">=5.6"
|
||||||
|
},
|
||||||
|
"require-dev": {
|
||||||
|
"phpunit/phpunit": "^5.7 | ^7.5 | ^8.0 | ^9.0"
|
||||||
|
},
|
||||||
|
"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/1.0.5.2"
|
||||||
|
},
|
||||||
|
"time": "2021-07-13T18:46:38+00:00"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "psr/container",
|
||||||
|
"version": "1.1.2",
|
||||||
|
"source": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/php-fig/container.git",
|
||||||
|
"reference": "513e0666f7216c7459170d56df27dfcefe1689ea"
|
||||||
|
},
|
||||||
|
"dist": {
|
||||||
|
"type": "zip",
|
||||||
|
"url": "https://api.github.com/repos/php-fig/container/zipball/513e0666f7216c7459170d56df27dfcefe1689ea",
|
||||||
|
"reference": "513e0666f7216c7459170d56df27dfcefe1689ea",
|
||||||
|
"shasum": ""
|
||||||
|
},
|
||||||
|
"require": {
|
||||||
|
"php": ">=7.4.0"
|
||||||
|
},
|
||||||
|
"type": "library",
|
||||||
|
"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/1.1.2"
|
||||||
|
},
|
||||||
|
"time": "2021-11-05T16:50:12+00:00"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "psr/http-message",
|
||||||
|
"version": "1.1",
|
||||||
|
"source": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/php-fig/http-message.git",
|
||||||
|
"reference": "cb6ce4845ce34a8ad9e68117c10ee90a29919eba"
|
||||||
|
},
|
||||||
|
"dist": {
|
||||||
|
"type": "zip",
|
||||||
|
"url": "https://api.github.com/repos/php-fig/http-message/zipball/cb6ce4845ce34a8ad9e68117c10ee90a29919eba",
|
||||||
|
"reference": "cb6ce4845ce34a8ad9e68117c10ee90a29919eba",
|
||||||
|
"shasum": ""
|
||||||
|
},
|
||||||
|
"require": {
|
||||||
|
"php": "^7.2 || ^8.0"
|
||||||
|
},
|
||||||
|
"type": "library",
|
||||||
|
"extra": {
|
||||||
|
"branch-alias": {
|
||||||
|
"dev-master": "1.1.x-dev"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"autoload": {
|
||||||
|
"psr-4": {
|
||||||
|
"Psr\\Http\\Message\\": "src/"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"notification-url": "https://packagist.org/downloads/",
|
||||||
|
"license": [
|
||||||
|
"MIT"
|
||||||
|
],
|
||||||
|
"authors": [
|
||||||
|
{
|
||||||
|
"name": "PHP-FIG",
|
||||||
|
"homepage": "http://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/1.1"
|
||||||
|
},
|
||||||
|
"time": "2023-04-04T09:50:52+00:00"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "psr/log",
|
||||||
|
"version": "1.1.4",
|
||||||
|
"source": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/php-fig/log.git",
|
||||||
|
"reference": "d49695b909c3b7628b6289db5479a1c204601f11"
|
||||||
|
},
|
||||||
|
"dist": {
|
||||||
|
"type": "zip",
|
||||||
|
"url": "https://api.github.com/repos/php-fig/log/zipball/d49695b909c3b7628b6289db5479a1c204601f11",
|
||||||
|
"reference": "d49695b909c3b7628b6289db5479a1c204601f11",
|
||||||
|
"shasum": ""
|
||||||
|
},
|
||||||
|
"require": {
|
||||||
|
"php": ">=5.3.0"
|
||||||
|
},
|
||||||
|
"type": "library",
|
||||||
|
"extra": {
|
||||||
|
"branch-alias": {
|
||||||
|
"dev-master": "1.1.x-dev"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"autoload": {
|
||||||
|
"psr-4": {
|
||||||
|
"Psr\\Log\\": "Psr/Log/"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"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/1.1.4"
|
||||||
|
},
|
||||||
|
"time": "2021-05-03T11:20:27+00:00"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "psr/simple-cache",
|
||||||
|
"version": "1.0.1",
|
||||||
|
"source": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/php-fig/simple-cache.git",
|
||||||
|
"reference": "408d5eafb83c57f6365a3ca330ff23aa4a5fa39b"
|
||||||
|
},
|
||||||
|
"dist": {
|
||||||
|
"type": "zip",
|
||||||
|
"url": "https://api.github.com/repos/php-fig/simple-cache/zipball/408d5eafb83c57f6365a3ca330ff23aa4a5fa39b",
|
||||||
|
"reference": "408d5eafb83c57f6365a3ca330ff23aa4a5fa39b",
|
||||||
|
"shasum": ""
|
||||||
|
},
|
||||||
|
"require": {
|
||||||
|
"php": ">=5.3.0"
|
||||||
|
},
|
||||||
|
"type": "library",
|
||||||
|
"extra": {
|
||||||
|
"branch-alias": {
|
||||||
|
"dev-master": "1.0.x-dev"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"autoload": {
|
||||||
|
"psr-4": {
|
||||||
|
"Psr\\SimpleCache\\": "src/"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"notification-url": "https://packagist.org/downloads/",
|
||||||
|
"license": [
|
||||||
|
"MIT"
|
||||||
|
],
|
||||||
|
"authors": [
|
||||||
|
{
|
||||||
|
"name": "PHP-FIG",
|
||||||
|
"homepage": "http://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/master"
|
||||||
|
},
|
||||||
|
"time": "2017-10-23T01:57:42+00:00"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "topthink/framework",
|
||||||
|
"version": "v6.1.5",
|
||||||
|
"source": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/top-think/framework.git",
|
||||||
|
"reference": "57d1950a1844ef8d3098ea290032aeb92e2e32c3"
|
||||||
|
},
|
||||||
|
"dist": {
|
||||||
|
"type": "zip",
|
||||||
|
"url": "https://api.github.com/repos/top-think/framework/zipball/57d1950a1844ef8d3098ea290032aeb92e2e32c3",
|
||||||
|
"reference": "57d1950a1844ef8d3098ea290032aeb92e2e32c3",
|
||||||
|
"shasum": ""
|
||||||
|
},
|
||||||
|
"require": {
|
||||||
|
"ext-json": "*",
|
||||||
|
"ext-mbstring": "*",
|
||||||
|
"php": ">=7.2.5",
|
||||||
|
"psr/container": "~1.0",
|
||||||
|
"psr/http-message": "^1.0",
|
||||||
|
"psr/log": "~1.0",
|
||||||
|
"psr/simple-cache": "^1.0",
|
||||||
|
"topthink/think-helper": "^3.1.1",
|
||||||
|
"topthink/think-orm": "^2.0|^3.0"
|
||||||
|
},
|
||||||
|
"require-dev": {
|
||||||
|
"guzzlehttp/psr7": "^2.1.0",
|
||||||
|
"mikey179/vfsstream": "^1.6",
|
||||||
|
"mockery/mockery": "^1.2",
|
||||||
|
"phpunit/phpunit": "^7.0"
|
||||||
|
},
|
||||||
|
"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/v6.1.5"
|
||||||
|
},
|
||||||
|
"time": "2024-04-16T02:01:19+00:00"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "topthink/think-helper",
|
||||||
|
"version": "v3.1.11",
|
||||||
|
"source": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/top-think/think-helper.git",
|
||||||
|
"reference": "1d6ada9b9f3130046bf6922fe1bd159c8d88a33c"
|
||||||
|
},
|
||||||
|
"dist": {
|
||||||
|
"type": "zip",
|
||||||
|
"url": "https://api.github.com/repos/top-think/think-helper/zipball/1d6ada9b9f3130046bf6922fe1bd159c8d88a33c",
|
||||||
|
"reference": "1d6ada9b9f3130046bf6922fe1bd159c8d88a33c",
|
||||||
|
"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.11"
|
||||||
|
},
|
||||||
|
"time": "2025-04-07T06:55:59+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": "v2.0.62",
|
||||||
|
"source": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/top-think/think-orm.git",
|
||||||
|
"reference": "e53bfea572a133039ad687077120de5521af617f"
|
||||||
|
},
|
||||||
|
"dist": {
|
||||||
|
"type": "zip",
|
||||||
|
"url": "https://api.github.com/repos/top-think/think-orm/zipball/e53bfea572a133039ad687077120de5521af617f",
|
||||||
|
"reference": "e53bfea572a133039ad687077120de5521af617f",
|
||||||
|
"shasum": ""
|
||||||
|
},
|
||||||
|
"require": {
|
||||||
|
"ext-json": "*",
|
||||||
|
"ext-pdo": "*",
|
||||||
|
"php": ">=7.1.0",
|
||||||
|
"psr/log": "^1.0|^2.0",
|
||||||
|
"psr/simple-cache": "^1.0|^2.0",
|
||||||
|
"topthink/think-helper": "^3.1"
|
||||||
|
},
|
||||||
|
"require-dev": {
|
||||||
|
"phpunit/phpunit": "^7|^8|^9.5"
|
||||||
|
},
|
||||||
|
"type": "library",
|
||||||
|
"autoload": {
|
||||||
|
"files": [
|
||||||
|
"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": "think orm",
|
||||||
|
"keywords": [
|
||||||
|
"database",
|
||||||
|
"orm"
|
||||||
|
],
|
||||||
|
"support": {
|
||||||
|
"issues": "https://github.com/top-think/think-orm/issues",
|
||||||
|
"source": "https://github.com/top-think/think-orm/tree/v2.0.62"
|
||||||
|
},
|
||||||
|
"time": "2024-09-22T06:17:47+00:00"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "topthink/think-template",
|
||||||
|
"version": "v2.0.10",
|
||||||
|
"source": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/top-think/think-template.git",
|
||||||
|
"reference": "2b28c9f787c94f6c22312c9fe97dd3d926c03e1c"
|
||||||
|
},
|
||||||
|
"dist": {
|
||||||
|
"type": "zip",
|
||||||
|
"url": "https://api.github.com/repos/top-think/think-template/zipball/2b28c9f787c94f6c22312c9fe97dd3d926c03e1c",
|
||||||
|
"reference": "2b28c9f787c94f6c22312c9fe97dd3d926c03e1c",
|
||||||
|
"shasum": ""
|
||||||
|
},
|
||||||
|
"require": {
|
||||||
|
"php": ">=7.1.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/v2.0.10"
|
||||||
|
},
|
||||||
|
"time": "2024-08-12T05:48:57+00:00"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "topthink/think-view",
|
||||||
|
"version": "v1.0.14",
|
||||||
|
"source": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/top-think/think-view.git",
|
||||||
|
"reference": "edce0ae2c9551ab65f9e94a222604b0dead3576d"
|
||||||
|
},
|
||||||
|
"dist": {
|
||||||
|
"type": "zip",
|
||||||
|
"url": "https://api.github.com/repos/top-think/think-view/zipball/edce0ae2c9551ab65f9e94a222604b0dead3576d",
|
||||||
|
"reference": "edce0ae2c9551ab65f9e94a222604b0dead3576d",
|
||||||
|
"shasum": ""
|
||||||
|
},
|
||||||
|
"require": {
|
||||||
|
"php": ">=7.1.0",
|
||||||
|
"topthink/think-template": "^2.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/v1.0.14"
|
||||||
|
},
|
||||||
|
"time": "2019-11-06T11:40:13+00:00"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"packages-dev": [
|
||||||
|
{
|
||||||
|
"name": "symfony/polyfill-mbstring",
|
||||||
|
"version": "v1.33.0",
|
||||||
|
"source": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/symfony/polyfill-mbstring.git",
|
||||||
|
"reference": "6d857f4d76bd4b343eac26d6b539585d2bc56493"
|
||||||
|
},
|
||||||
|
"dist": {
|
||||||
|
"type": "zip",
|
||||||
|
"url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/6d857f4d76bd4b343eac26d6b539585d2bc56493",
|
||||||
|
"reference": "6d857f4d76bd4b343eac26d6b539585d2bc56493",
|
||||||
|
"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.33.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": "2024-12-23T08:48:59+00:00"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "symfony/polyfill-php72",
|
||||||
|
"version": "v1.31.0",
|
||||||
|
"source": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/symfony/polyfill-php72.git",
|
||||||
|
"reference": "fa2ae56c44f03bed91a39bfc9822e31e7c5c38ce"
|
||||||
|
},
|
||||||
|
"dist": {
|
||||||
|
"type": "zip",
|
||||||
|
"url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/fa2ae56c44f03bed91a39bfc9822e31e7c5c38ce",
|
||||||
|
"reference": "fa2ae56c44f03bed91a39bfc9822e31e7c5c38ce",
|
||||||
|
"shasum": ""
|
||||||
|
},
|
||||||
|
"require": {
|
||||||
|
"php": ">=7.2"
|
||||||
|
},
|
||||||
|
"type": "metapackage",
|
||||||
|
"extra": {
|
||||||
|
"thanks": {
|
||||||
|
"url": "https://github.com/symfony/polyfill",
|
||||||
|
"name": "symfony/polyfill"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"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 backporting some PHP 7.2+ features to lower PHP versions",
|
||||||
|
"homepage": "https://symfony.com",
|
||||||
|
"keywords": [
|
||||||
|
"compatibility",
|
||||||
|
"polyfill",
|
||||||
|
"portable",
|
||||||
|
"shim"
|
||||||
|
],
|
||||||
|
"support": {
|
||||||
|
"source": "https://github.com/symfony/polyfill-php72/tree/v1.31.0"
|
||||||
|
},
|
||||||
|
"funding": [
|
||||||
|
{
|
||||||
|
"url": "https://symfony.com/sponsor",
|
||||||
|
"type": "custom"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"url": "https://github.com/fabpot",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
|
||||||
|
"type": "tidelift"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"time": "2024-09-09T11:45:10+00:00"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "symfony/polyfill-php80",
|
||||||
|
"version": "v1.33.0",
|
||||||
|
"source": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/symfony/polyfill-php80.git",
|
||||||
|
"reference": "0cc9dd0f17f61d8131e7df6b84bd344899fe2608"
|
||||||
|
},
|
||||||
|
"dist": {
|
||||||
|
"type": "zip",
|
||||||
|
"url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/0cc9dd0f17f61d8131e7df6b84bd344899fe2608",
|
||||||
|
"reference": "0cc9dd0f17f61d8131e7df6b84bd344899fe2608",
|
||||||
|
"shasum": ""
|
||||||
|
},
|
||||||
|
"require": {
|
||||||
|
"php": ">=7.2"
|
||||||
|
},
|
||||||
|
"type": "library",
|
||||||
|
"extra": {
|
||||||
|
"thanks": {
|
||||||
|
"url": "https://github.com/symfony/polyfill",
|
||||||
|
"name": "symfony/polyfill"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"autoload": {
|
||||||
|
"files": [
|
||||||
|
"bootstrap.php"
|
||||||
|
],
|
||||||
|
"psr-4": {
|
||||||
|
"Symfony\\Polyfill\\Php80\\": ""
|
||||||
|
},
|
||||||
|
"classmap": [
|
||||||
|
"Resources/stubs"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"notification-url": "https://packagist.org/downloads/",
|
||||||
|
"license": [
|
||||||
|
"MIT"
|
||||||
|
],
|
||||||
|
"authors": [
|
||||||
|
{
|
||||||
|
"name": "Ion Bazan",
|
||||||
|
"email": "[email protected]"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Nicolas Grekas",
|
||||||
|
"email": "[email protected]"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Symfony Community",
|
||||||
|
"homepage": "https://symfony.com/contributors"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"description": "Symfony polyfill backporting some PHP 8.0+ features to lower PHP versions",
|
||||||
|
"homepage": "https://symfony.com",
|
||||||
|
"keywords": [
|
||||||
|
"compatibility",
|
||||||
|
"polyfill",
|
||||||
|
"portable",
|
||||||
|
"shim"
|
||||||
|
],
|
||||||
|
"support": {
|
||||||
|
"source": "https://github.com/symfony/polyfill-php80/tree/v1.33.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": "2025-01-02T08:10:11+00:00"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "symfony/var-dumper",
|
||||||
|
"version": "v4.4.47",
|
||||||
|
"source": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/symfony/var-dumper.git",
|
||||||
|
"reference": "1069c7a3fca74578022fab6f81643248d02f8e63"
|
||||||
|
},
|
||||||
|
"dist": {
|
||||||
|
"type": "zip",
|
||||||
|
"url": "https://api.github.com/repos/symfony/var-dumper/zipball/1069c7a3fca74578022fab6f81643248d02f8e63",
|
||||||
|
"reference": "1069c7a3fca74578022fab6f81643248d02f8e63",
|
||||||
|
"shasum": ""
|
||||||
|
},
|
||||||
|
"require": {
|
||||||
|
"php": ">=7.1.3",
|
||||||
|
"symfony/polyfill-mbstring": "~1.0",
|
||||||
|
"symfony/polyfill-php72": "~1.5",
|
||||||
|
"symfony/polyfill-php80": "^1.16"
|
||||||
|
},
|
||||||
|
"conflict": {
|
||||||
|
"phpunit/phpunit": "<4.8.35|<5.4.3,>=5.0",
|
||||||
|
"symfony/console": "<3.4"
|
||||||
|
},
|
||||||
|
"require-dev": {
|
||||||
|
"ext-iconv": "*",
|
||||||
|
"symfony/console": "^3.4|^4.0|^5.0",
|
||||||
|
"symfony/process": "^4.4|^5.0",
|
||||||
|
"twig/twig": "^1.43|^2.13|^3.0.4"
|
||||||
|
},
|
||||||
|
"suggest": {
|
||||||
|
"ext-iconv": "To convert non-UTF-8 strings to UTF-8 (or symfony/polyfill-iconv in case ext-iconv cannot be used).",
|
||||||
|
"ext-intl": "To show region name in time zone dump",
|
||||||
|
"symfony/console": "To use the ServerDumpCommand and/or the bin/var-dump-server script"
|
||||||
|
},
|
||||||
|
"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/v4.4.47"
|
||||||
|
},
|
||||||
|
"funding": [
|
||||||
|
{
|
||||||
|
"url": "https://symfony.com/sponsor",
|
||||||
|
"type": "custom"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"url": "https://github.com/fabpot",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
|
||||||
|
"type": "tidelift"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"time": "2022-10-03T15:15:11+00:00"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "topthink/think-trace",
|
||||||
|
"version": "v1.6",
|
||||||
|
"source": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/top-think/think-trace.git",
|
||||||
|
"reference": "136cd5d97e8bdb780e4b5c1637c588ed7ca3e142"
|
||||||
|
},
|
||||||
|
"dist": {
|
||||||
|
"type": "zip",
|
||||||
|
"url": "https://api.github.com/repos/top-think/think-trace/zipball/136cd5d97e8bdb780e4b5c1637c588ed7ca3e142",
|
||||||
|
"reference": "136cd5d97e8bdb780e4b5c1637c588ed7ca3e142",
|
||||||
|
"shasum": ""
|
||||||
|
},
|
||||||
|
"require": {
|
||||||
|
"php": ">=7.1.0",
|
||||||
|
"topthink/framework": "^6.0|^8.0"
|
||||||
|
},
|
||||||
|
"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/v1.6"
|
||||||
|
},
|
||||||
|
"time": "2023-02-07T08:36:32+00:00"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"aliases": [],
|
||||||
|
"minimum-stability": "stable",
|
||||||
|
"stability-flags": [],
|
||||||
|
"prefer-stable": false,
|
||||||
|
"prefer-lowest": false,
|
||||||
|
"platform": {
|
||||||
|
"php": ">=7.3.5",
|
||||||
|
"ext-curl": "*",
|
||||||
|
"ext-json": "*",
|
||||||
|
"ext-zip": "*",
|
||||||
|
"ext-pdo": "*",
|
||||||
|
"ext-iconv": "*"
|
||||||
|
},
|
||||||
|
"platform-dev": [],
|
||||||
|
"plugin-api-version": "2.6.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.11',
|
||||||
'ver' => 1091
|
'ver' => 1092
|
||||||
];
|
];
|
||||||
|
|||||||
+1
-1
@@ -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', '彩虹工具网,源码查看器原创,在线,工具'),
|
||||||
|
|||||||
@@ -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'
|
||||||
|
|||||||
@@ -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\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/9PTFFpaf9L\/\/\/\/\/\/\/\/\/\/\/\/R\/\/\/\/\/\/\/\/\/\/\/\/0j\/\/\/\/\/\/\/\/\/\/\/9K\/\/\/\/\/\/\/\/\/\/\/\/Ov\/\/\/\/\/\/\/\/\/\/\/zf\/\/\/86\/zr\/Ov88\/zf\/Pf\/\/\/0v\/S\/8\/\/\/\/\/\/\/\/\/\/\/\/\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"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}]';
|
$json = '[{"data_hr":"\/\/\/\/\/\/9L\/\/\/\/\/\/\/\/\/\/\/\/Vv\/\/\/\/\/\/\/\/\/\/\/0v\/\/\/\/\/\/\/\/\/\/\/9e\/\/\/\/\/0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AfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAAfgAA","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}]';
|
||||||
|
|
||||||
@@ -75,12 +93,16 @@ class XiaomiSport
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
private function curl($url, $data=null, $app_token=null){
|
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,7 +116,7 @@ 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);
|
||||||
|
|||||||
@@ -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'=>'视频链接不能为空']);
|
||||||
|
|
||||||
try{
|
$apitype = $this->get_api_type($video_url);
|
||||||
$result = $this->parse($video_url);
|
if(!$apitype) return json(['code'=>-1, 'msg'=>'不支持该视频链接']);
|
||||||
return json(['code'=>0, 'msg'=>'success', 'data'=>$result]);
|
|
||||||
}catch(\Exception $e){
|
$classname = 'plugin\\utility\\videoparse\\api\\'.$apitype;
|
||||||
return json(['code'=>-1, 'msg'=>$e->getMessage()]);
|
if(class_exists($classname)){
|
||||||
|
$instance = new $classname();
|
||||||
|
try{
|
||||||
|
$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>
|
||||||
|
|||||||
+31
-9
@@ -62,16 +62,38 @@ class App extends Plugin
|
|||||||
}
|
}
|
||||||
|
|
||||||
private function queryapi($domain){
|
private function queryapi($domain){
|
||||||
$url = config_get('qqapi_url').'api.php?act=icpquery';
|
if(config_get('qqapi_url')){
|
||||||
$post = 'key='.config_get('qqapi_key').'&domain='.$domain;
|
$url = config_get('qqapi_url').'api.php?act=icpquery';
|
||||||
$data = get_curl($url, $post);
|
$post = 'key='.config_get('qqapi_key').'&domain='.$domain;
|
||||||
$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.other.icp?url='.urlencode($domain);
|
||||||
|
$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 [
|
||||||
|
'Domain' => $arr['data']['domain'],
|
||||||
|
'DomainIcpNum' => $arr['data']['icp'],
|
||||||
|
'CompanyName' => $arr['data']['unitName'],
|
||||||
|
'CompanyType' => $arr['data']['natureName'],
|
||||||
|
'AuditTime' => $arr['data']['updateRecordTime'],
|
||||||
|
];
|
||||||
|
}elseif(isset($arr['msg'])){
|
||||||
|
throw new Exception('接口请求失败,'.$arr['msg']);
|
||||||
|
}else{
|
||||||
|
throw new Exception('接口请求失败');
|
||||||
|
}
|
||||||
}else{
|
}else{
|
||||||
throw new Exception('接口请求失败');
|
throw new Exception('请先配置API接口参数');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -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>
|
||||||
|
|||||||
Reference in New Issue
Block a user