no message

This commit is contained in:
hellcat committed 2025-05-05 17:54:15 +08:00
1 parent 5f9f707c8e
commit 2b2d20fde7
62 files changed
+617 -212

No files matched your search

+72 -33
View File
@@ -7,47 +7,86 @@ use App\Models\ArticleList;
use App\Services\Time;
use voku\helper\AntiXSS;
use App\Models\Tags;
use App\Services\TomTool\Http;
class SakaiController extends Controller
{
public function tool() {
// $directory = 'feed'; // 替换为你的文件夹路径
// $files = glob($directory . '/clash-*'); // 查找以sss开头的文件
//
// foreach ($files as $file) {
// $pathInfo = pathinfo($file); // 获取文件信息
// $newFileName = $pathInfo['dirname'] . '/' . $pathInfo['filename'] . '.yaml'; // 新文件名
// rename($file, $newFileName); // 重命名文件
// }
//
// echo "文件后缀已更改为 .ccc";
//
// exit;
// $k = request('k');
//
// if ($k != env('k')) {
// exit;
// }
$kv = [
'节点每日更新 @cron' => '/exec/freenode/up',
'静态生成 - 客户端文章' => '/exec/html/client',
'模版 - 免费节点文章' => '/fn/single/20241231',
'模版 - 客户端文章' => '/client/singe/1001',
'静态生成 - 热门标签 @cron' => '/exec/html/toptags',
'节点文章 - 批量抓' => '/exec/freenode/craw',
'节点文章 - 自动删除 @cron' => '/exec/freenode/del',
'点赞 - 初始数据' => '/exec/like/init',
'点赞 - 自动增加 @cron' => '/exec/like/auto',
'节点文章 - 生成数据' => '/exec/freenode/data/all',
'所有文章 - 静态化' => '/exec/freenode/html/all',
"/exec/cron" => "cron n合1",
"@cron /exec/freenode/up" => "免费节点文章每日更新",
"@cron /exec/freenode/del" => "免费节点文章自动删除(超过1年)",
"@cron /exec/html/toptags" => "静态生成 - 热门标签",
"@cron /exec/like/auto" => "自动点赞",
"/exec/html/client" => "静态生成 - 客户端文章",
"/exec/html/article" => "静态生成 - 所有文章",
"/exec/html/single/{code}" => "静态生成 - 指定文章",
"/exec/data/freenode/all" => "数据生成 - 所有免费节点文章(一年)(凭空生成无压力)",
"/exec/like/init" => "点赞重新赋值 - 所有文章(无压力刷着玩)",
"/exec/freenode/craw/{day}" => "免费节点文章批量抓(循环调用up)",
];
return view('test/tool', [
'ky' => $kv
]);
$str = "\n";
foreach ($kv as $k => $v) {
$str .= $k." >>> ".$v."\n\n";
}
$str .= "\n";
echo $str;
exit;
}
public function test1()
{
@$k = $_GET["k"];
@$s = $_GET["s"];
if ($k !== "wocaonide") {
exit("?");
}
$s = '/'.$s;
//test
// $s = "\/AticleSet__1115zz__sale_rate 1118.118";
// $s = "\/git#LastTime 1";
$s= "/cmd#list";
$oHttp = new Http();
$oHttp->sMethod = "post";
$oHttp->sToUrl = env("APP_URL")."/api/tg/hook";
$oHttp->bIsJson = true;
$oHttp->aData = [
'update_id' => 123456789,
'message' => [
'message_id' => 1,
'from' => [
'id' => 7740568271,
'is_bot' => false,
'first_name' => 'John',
'last_name' => 'Doe',
'username' => 'johndoe',
'language_code' => 'en'
],
'chat' => [
'id' => -4668400285,
'first_name' => 'John',
'last_name' => 'Doe',
'username' => 'johndoe',
'type' => 'private'
],
'date' => 1610000000,
"text" => $s,
]
];
$r = $oHttp->send();
var_dump($r);
exit;
}
}