This repository has been archived on 2024-03-18. You can view files and clone it, but cannot push or open issues or pull requests.
discord-questbook/Questbook.php

20 lines
585 B
PHP

<?php
class Questbook {
protected $connection;
public function __construct() {
$this->connection = new \GuzzleHttp\Client();
}
public function get($timestamp = '') {
$request = new \GuzzleHttp\Psr7\Request('POST', 'https://quest-book.ru/forum/chat/message.php', [
'body' => [
'msg' => '',
'from' => $timestamp,
'away' => 0
]
]);
$response = $this->connection->send($request);
$response = $response->getBody();
return json_decode($response);
}
}