no message
This commit is contained in:
parent
72a0c52133
commit
89b98e102d
@ -30,6 +30,45 @@ final class TestController extends BaseController
|
||||
exit('x');
|
||||
}
|
||||
|
||||
|
||||
$url = 'https://fuc.loc/api/tg/hook';
|
||||
$data = [
|
||||
'message' => [
|
||||
'chat' => [
|
||||
'id' => '123456789'
|
||||
],
|
||||
'text' => '/test'
|
||||
]
|
||||
];
|
||||
|
||||
$options = [
|
||||
'http' => [
|
||||
'header' => "Content-Type: application/json\r\n",
|
||||
'method' => 'POST',
|
||||
'content' => json_encode($data),
|
||||
],
|
||||
'ssl' => [
|
||||
'verify_peer' => false,
|
||||
'verify_peer_name' => false,
|
||||
],
|
||||
];
|
||||
|
||||
$context = stream_context_create($options);
|
||||
$result = file_get_contents($url, false, $context);
|
||||
|
||||
if ($result === FALSE) {
|
||||
die('Error');
|
||||
}
|
||||
|
||||
echo $result;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
exit;
|
||||
|
||||
$jobs = new CronService();
|
||||
|
||||
$jobs->bandwidthMerge();
|
||||
|
||||
@ -11,7 +11,7 @@ namespace App\Controllers\TomApi\Tg;
|
||||
|
||||
use App\Models\Config;
|
||||
|
||||
final class HookController extends BaseController
|
||||
final class HookController
|
||||
{
|
||||
|
||||
public $sApiToken;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user