20 lines
585 B
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);
|
|
}
|
|
}
|