/tca

Telegram Channel/Chat Analytics

Primary LanguagePHP

Telegram Channel/Chat Analytics

The application allows you to conduct a complete analysis of subscribers to your telegram channel or chat. This project is a wrapper for repository MadelineProto

Installing

The list of commands implies a pre-installed Composer and Docker

    git clone git@github.com:revilon1991/tca.git
    cd tca
    cp .env.dist .env
    docker-compose build
    docker-compose up -d
    docker-compose exec php bash
    composer install
    php bin/console doctrine:schema:update -f

Configuration

Configure environment variables in the .env file.

AppId and AppHash for the madelineproto environment can be obtained after registering your application on the resource my.telegram.org

DEFAULT_FETCH_GROUP_SUBSCRIBER - group id without "@" which will by default receive subscriber updates.

###> danog/madelineproto ###
MADELINEPROTO_CONNECTION_API_ID=''
MADELINEPROTO_CONNECTION_API_HASH=''

MADELINEPROTO_CONNECTION_BOT_TOKEN=''
###< danog/madelineproto ###

###> mybuilder/cronos-bundle ###
CRON_SHELL='/bin/bash'
CRON_MAILTO='test@gmail.com'
CRON_PHP_EXECUTOR='/usr/bin/php'
###< mybuilder/cronos-bundle ###

###> application ###
DEFAULT_FETCH_GROUP_SUBSCRIBER=''
###< application ###

Proxy settings - optional.

###> danog/madelineproto ###
MADELINEPROTO_CONNECTION_PROXY_HOST=''
MADELINEPROTO_CONNECTION_PROXY_PORT=''
MADELINEPROTO_CONNECTION_PROXY_USERNAME=''
MADELINEPROTO_CONNECTION_PROXY_PASSWORD=''
###< danog/madelineproto ###

Usage

Fetch group info:

php bin/console fetch:group [channael/chat id]

Fetch all subscribers by group:

php bin/console fetch:group:subscribers [channael/chat id]

Fetch all subscribers photo by group:

php bin/console fetch:subscribers:photo [channael/chat id]

After executing the commands, you can observe aggregated data in the database tables.

License

license