53 lines
1.2 KiB
PHP
Executable File
53 lines
1.2 KiB
PHP
Executable File
<?php
|
|
|
|
namespace App\Http\Controllers;
|
|
|
|
use Illuminate\Http\Request;
|
|
//use App\Models\Article;
|
|
use App\Services\TomTool\Http;
|
|
//use voku\helper\AntiXSS;
|
|
|
|
class TestsController
|
|
{
|
|
|
|
public function hook()
|
|
{
|
|
|
|
$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" => "\/ArticleSet__5__sale_rate 1118.118",
|
|
]
|
|
];
|
|
|
|
$r = $oHttp->send();
|
|
|
|
echo($r);
|
|
|
|
exit;
|
|
|
|
}
|
|
|
|
}
|