93 lines
2.7 KiB
PHP
Executable File
93 lines
2.7 KiB
PHP
Executable File
<?php
|
||
|
||
namespace App\Http\Controllers;
|
||
|
||
use Illuminate\Http\Request;
|
||
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() {
|
||
|
||
$kv = [
|
||
"/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)",
|
||
];
|
||
|
||
$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;
|
||
}
|
||
}
|