Answer the question
In order to leave comments, you need to log in
Script for the site, how to do?
I have a script to track new subscribers to VK groups. I can’t figure out how to make it so that the site could make buttons for entering groups and a token. Tell me who has experienced this.
$page = 0; // ������ ���� �� ������ ���� ���� �������� �� ����
$limit = 1000; // ������ ���� �� ������ ���� ���� �������� �� ����
do {
$offset = $page * $limit ;
$getlist = vkapi('groups.getMembers?group_id='.$guid.'&sort=id_asc&offset='.$offset.'&count=1000&access_token='.$token.'&v=5.64');
$json_get_all = json_decode($getlist, true); $list = $json_get_all['response']['items']; $countcomm = $json_get_all['response']['count'];
if (! is_array($collectuids)) { $collectuids = $list; }
if (is_array($collectuids)) { $previos = $collectuids; $collectuids = array_merge($previos, $list); }
++$page; usleep(335000); }
while($countcomm > $offset + $limit );
$uniqs = array_unique($collectuids);
$ridding = fopen('service/glist.txt', 'r'); $unsr = fgets($ridding, 98765432); fclose($ridding); $last = unserialize($unsr);
$different = array_diff($uniqs, $last);
$ss = serialize($uniqs); $wrguids = fopen("service/glist.txt", "w+b"); fwrite($wrguids,$ss); fclose($wrguids);
$ss = serialize($different); $wrguids = fopen("service/diferent.txt", "w+b"); fwrite($wrguids,$ss); fclose($wrguids);
function vkapi($method) {
$ch = curl_init(" https://api.vk.
curl_setopt($ch,CURLOPT_RETURNTRANSFER,true);
curl_setopt($ch,CURLOPT_SSL_VERIFYHOST,false);
curl_setopt($ch,CURLOPT_SSL_VERIFYPEER,false);
$response = curl_exec($ch);
curl_close($ch);
return $response;
}
?>
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question