<?php
// КОНФИГ
$you_token = 'ТОКЕН'; // Можно получить по ссылке: https://oauth.vk.com/authorize?client_id=3116505&scope=1073737727&redirect_uri=https://api.vk.com/blank.html&display=page&response_type=token&revoke=1
$you_year = 'ВАШ ГОД РОЖДЕНИЯ'
// КОД
$a_date = date('d.m');
$request_params = array(
'bdate' => $a_date.'.'.$you_year,
'v' => '5.52',
'access_token' => $you_token
);
$get_params = http_build_query($request_params);
$result = file_get_contents('https://api.vk.com/method/account.saveProfileInfo?'. $get_params);
echo($result);
?>
<div class="row photos">
<?php
$apage = $_GET['page'];
if(isset($apage)){
$aoffset = $apage-1;
$aoffset = 16*$aoffset;
}
$fpt = file_get_contents('https://api.vk.com/method/photos.get?owner_id=-183487496&album_id=265483073&count=200&offset='.$aoffset.'&rev=1&access_token=a74&v=5.50');
$jjs = json_decode($fpt);
$jrnd = $jjs->response->count;
$apage = ceil($jrnd/16);
$x=-1;
while ($x<15)
{
$x++;
$pid = $jjs->response->items[$x]->photo_604;
echo '<div class="col-sm-6 col-md-4 col-lg-3 item"><a data-lightbox="photos" href="';
echo $pid;
echo '"><img class="img-fluid" src="';
echo $pid;
echo '"></a></div>';
}
?>
<ul class="pagination">
<?php
$z=0;
while ($z < $apage){
$z++;
echo '<li class="page-item"><a class="page-link"';
$bpage = 1;
if(isset($_GET['page'])){
$bpage = $_GET['page'];
}
if ($z != $bpage){
echo 'href="index.php?page=';
echo $z;
echo '"';
}
echo '>';
echo $z;
echo '</a></li>';
}
?>
</ul>
</div>
</div>
</div>