i have followed up all your installation instuction at the page
and typen the basic usage in a .php file in my project folder
<?php
include('vendor/autoload.php');
use \unreal4u\TelegramAPI\HttpClientRequestHandler;
use \unreal4u\TelegramAPI\TgLog;
use \unreal4u\TelegramAPI\Telegram\Methods\SendMessage;
$loop = \React\EventLoop\Factory::create();
$handler = new HttpClientRequestHandler($loop);
$tgLog = new TgLog(BOT_TOKEN, $handler);
and when i open this .php through my browser it turns up
Parse error: syntax error, unexpected ':', expecting '{' in /Applications/XAMPP/xamppfiles/htdocs/hook/vendor/amphp/amp/lib/functions.php on line 21
i have followed up all your installation instuction at the page and typen the basic usage in a .php file in my project folder <?php include('vendor/autoload.php');
use \unreal4u\TelegramAPI\HttpClientRequestHandler; use \unreal4u\TelegramAPI\TgLog; use \unreal4u\TelegramAPI\Telegram\Methods\SendMessage;
$loop = \React\EventLoop\Factory::create(); $handler = new HttpClientRequestHandler($loop); $tgLog = new TgLog(BOT_TOKEN, $handler);
$sendMessage = new SendMessage(); $sendMessage->chat_id = A_USER_CHAT_ID; $sendMessage->text = 'Hello world!';
$tgLog->performApiRequest($sendMessage); $loop->run();
?>
and when i open this .php through my browser it turns up Parse error: syntax error, unexpected ':', expecting '{' in /Applications/XAMPP/xamppfiles/htdocs/hook/vendor/amphp/amp/lib/functions.php on line 21