PHP code example of xtrime-ru / telegramapiserver
1. Go to this page and download the library: Download xtrime-ru/telegramapiserver 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/ */
xtrime-ru / telegramapiserver example snippets
server.php --env=.env
server.php --env=sessions/.env.session
shell script
curl --location --request POST 'http://127.0.0.1:9503/api/sendDocument' \
--header 'Content-Type: application/json' \
--data-raw '{
"peer": "me",
"file": {
"_": "LocalUrl",
"file": "faust.txt"
},
"parseMode": "HTML",
"caption": "<b>caption text</b>"
}'