PHP code example of mfarahani / tcrawl
1. Go to this page and download the library: Download mfarahani/tcrawl 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/ */
mfarahani / tcrawl example snippets
$tCrawl = new TCrawler();
$tCrawl->setProxy("http://username:password@host:port");
$tCrawl->setChannel("channelname telegram");
$info = $tCrawl->crawler()->getInfo();
$formWithTemplate = false; //you can use 'true' or 'false' for generate template
$lastMessgae = $tCrawl->crawler()->getLastMessage($formWithTemplate);
$latestMessages = $tCrawl->crawler()->getLatestMessages($formWithTemplate, $fromId);
dump($info , $lastMessgae , $latestMessages );