This repository has been archived by the owner on Aug 10, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathTGC = SOLO = FastPostsInfo.php
128 lines (84 loc) · 2.92 KB
/
TGC = SOLO = FastPostsInfo.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
<?php
# - ### ### ###
# - ### ###
include 'ALL=includes/includes-BASIC.php';
use LibMy\Ancii;
use LibMy\TableDumper;
# - ### ###
include 'TGC = BEGIN = NEW OR DD.php';
# - ### ###
function getAllInfo($TGC, $groupId)
{
# - ###
$OPT_MaxLastPosts = 80;
# - ###
$TGC->setConfig_Chat($groupId);
# - ###
# Общая инфа
echo "<hr color='red'>";
dump("Группа = $groupId");
$TGC->api_groupGet_PostsWall_PostsCount();
$count = $TGC->getResult();
dump("Всего постов: $count");
$TGC->responseAll_Clear();
$TGC->api_groupGet_PostsWall_PTS();
dump("PTS постов: ".$TGC->getResult());
#$TGC->api_groupGet_UsersCount();
#dump("Подписоты: ".$TGC->getResult());
#dd($TGC->getResult());
#$TGC->responseAll_Clear();
$TGC->api_groupGet_PostsScheduled_Count();
dump("Отложка залито: ".$TGC->getResult());
$TGC->responseAll_Clear();
# - ###
# Получение и разборка постов
if($count > $OPT_MaxLastPosts)
$count = $OPT_MaxLastPosts;
$TGC->action_groupGet_PostsWall_ContentALL_Last($count);
$MSGsArr = $TGC->getResult();
dump("Получено постов: ".count($MSGsArr));
# - ###
TableDumper::echoStyle_1();
TableDumper::tableBegin();
TableDumper::makeHead([
'MSG_ID',
'URL',
'Дата',
'Текст',
'V_Now',
]);
TableDumper::bodyBegin();
#dd($MSGsArr);
foreach( $MSGsArr as $msgId => $data )
{
$finArr = [];
$finArr []= $data['MSG_ID'];
$url = $data['MSG_URL'];
$finArr []= '<a href="'.$url.'" target="_blank">'.$url.'</a>';
$finArr []= $data['DATE_T'];
$finArr []= substr($data['TEXT_ARR'][0],0,80);
$finArr []= $data['STAT_VIEWS'];
TableDumper::makeRow($finArr);
}# End OneMsg
TableDumper::bodyEnd();
TableDumper::tableEnd();
# - ###
}
# - ### ###
$IDsArr = [
$CHATS['G-KINO-1'],
$CHATS['G-KINO-2'],
$CHATS['G-KINO-3'],
$CHATS['G-GAME-1'],
];
foreach( $IDsArr as $groupId )
getAllInfo($TGC, $groupId);
# - ### ###
Ancii::success();
$TGC->onENDING_DD();
# - ### ### ###
# NOTE:
# - ##### ##### ##### ##### ##### ##### ######
# - ##### ##### ######
# - ##### ##### ##### ##### ##### ##### ######
# End class