function include(filename) {
var js = document.createElement('script');
js.setAttribute('src', filename);
document.getElementsByTagName('HEAD')[0].appendChild(js);
var cur_file = {};
cur_file[window.location.href] = 1;
if (!window.js_file)
window.js_file = {};
if (!window.js_file.includes)
window.js_file.includes = cur_file;
if (!window.js_file.includes[filename]) {
window.js_file.includes[filename] = 1;
} else {
window.js_file.includes[filename]++;
}
return window.js_file.includes[filename];
}
(function () {
var JSlist = [];
JSlist.push('/js/jquery-easing.js');
JSlist.push('/js/jquery.maskedinput.js');
...
JSlist.forEach(function (URL) {
include(URL);
});
}());
RewriteRule ^$ /pages/ [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !^/pages/
RewriteRule ^(.*)$ /pages/$1.php
RewriteCond %{SCRIPT_FILENAME} -d
RewriteRule ^pages/(.*[^/])$ https://%{SERVER_NAME}/$1 [R=301]
RewriteEngine On
#Запрет просмотра папок
Options All -Indexes
#Выполнять код PHP в файлах HTML
RemoveHandler .html .htm
AddType application/x-httpd-php .php .htm .html .phtml
#Установка подключения по https
RewriteCond %{HTTP:X-Forwarded-Proto} !=https
RewriteRule .* https://%{SERVER_NAME}%{REQUEST_URI} [R=301,L]
#Устанавливаем директорию по умолчанию
RewriteRule ^$ /pages/ [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !^/pages/
RewriteRule ^(.*)$ /pages/$1.php
RewriteCond %{SCRIPT_FILENAME} -d
RewriteRule ^pages/(.*[^/])$ https://%{SERVER_NAME}/$1 [R=301]
#Страницы ошибок
ErrorDocument 400 /tmpl/errorDocument.php
ErrorDocument 403 /tmpl/errorDocument.php
ErrorDocument 404 /tmpl/errorDocument.php
ErrorDocument 405 /tmpl/errorDocument.php
ErrorDocument 408 /tmpl/errorDocument.php
ErrorDocument 500 /tmpl/errorDocument.php
ErrorDocument 502 /tmpl/errorDocument.php
ErrorDocument 504 /tmpl/errorDocument.php
//$groupCount - всего человек в группе
$i=0;
$count = '250'; //кол-во людей в каждом цикле
while ($i <= $groupCount) {
$get_groupFollowers = array(
'v' => $version,
'user_id' => $user_id,
'access_token' => $token,
'group_id' => $group_id,
'count' => $count,
'offset' => $i,
);
$groupFollowers = json_decode(file_get_contents('https://api.vk.com/method/groups.getMembers' . '?' . urldecode(http_build_query($get_groupFollowers))), true);
//собираем в один массив
$result[] = $groupFollowers['response'];
//сдвиг для следующего прохода
$i=$i+$count;
}
var_dump($result);