<?
if (!file_exists('madeline.php')) {
copy('
https://phar.madelineproto.xyz/madeline.php', 'madeline.php');
}
require_once 'madeline.php';
$MadelineProto = new \danog\MadelineProto\API('session.madeline');
$MadelineProto->start();
$chat = 'тут указываем чат с которого надо спарсить';
$pwr_chat = $MadelineProto->getPwrChat($chat);
foreach ($pwr_chat['participants'] as $participant){
if($participant['user']['type']=='user'){
// echo $updates;
try {
file_put_contents('users.txt',"@".$participant['user']['username']."\n", FILE_APPEND);
echo "\n";
} catch (\Throwable $th) {
echo 'Не удалось получить username ';
}
}
}
?>