1. Go to this page and download the library: Download phenogram/scraper library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
phenogram / scraper example snippets
class BotCommand implements TypeInterface
{
/** @var string Text of the command; 1-32 characters. Can contain only lowercase English letters, digits and underscores. */
public string $command;
/** @var string Description of the command; 1-256 characters. */
public string $description;
}
/**
* This object represents a bot command.
*/
class BotCommand implements TypeInterface
{
/**
* @param string $command Text of the command; 1-32 characters. Can contain only lowercase English letters, digits and underscores.
* @param string $description description of the command; 1-256 characters
*/
public function __construct(
public string $command,
public string $description,
) {
}
}
...
Trait API
{
abstract public function sendRequest(string $method, array $args): mixed;
...
// TelegramBotApi.php
// ...
class TelegramBotApi
{
public function __construct(
protected TelegramBotApiClientInterface $client,
) {
}