As to method groups.getMembers community members who have a birthday today?

Here is the code:

date_default_timezone_set('Etc/GMT-5');
$date = date("d.m"); // Current date (day.month)
$datestr = strtotime($date);

//header('Content-type: application/json');
$token = "";
$page = 0;
$limit = 1000;
$users = array();
do {
 $offset = $page * $limit;
 //Get the list of users
 $members = json_decode(file_get_contents("https://api.vk.com/method/groups.getMembers?group_id=тутid&offset={$offset}&count={$limit}&fields=bdate&access_token={$token}&v=5.69"), true);

//Sleep
sleep(1);

 for($i = 0; $i < count($members['response']['items']); $i++) {
 $users []= $user; // add user to users

 $dateusers = strtotime($members['response']["items"][$i]["bdate"]);
 //$datevk = date("d.m.Y", $dateusers);
 //$datev = strtotime($datevk);

if ($dateusers == $datestr) {
//if(preg_match("~\s*(09.12)\s*~u", $datevk)) {
 echo $members['response']["items"][$i]["bdate"].' <a href="//vk.com/id'.$members['response'][" items"][$i]["id"].'" target="_blank">'.$members['response']["items"][$i]["first_name"].'</a><br>';
} else {$members['response']['items'][$i]['bdate'] = "";}

}
 //Increment the page
$page++;
} while($members['response']['count'] > $offset + $limit );

foreach ($users as $n => $user) // go through the users
 if(@$user['deactivated']) // and banned
 unset($users[$n]); // delete
//var_dump($users);


Everything works, but it gets only one specified dates without the year in the format "10.12" (10 December). And how to make received and if the year without the year?

I select like this:

if ($dateusers == $datestr) {
 echo $members['response']["items"][$i]["bdate"].' <a href="//vk.com/id'.$members['response'][" items"][$i]["id"].'" target="_blank">'.$members['response']["items"][$i]["first_name"].'</a><br>';
} else {$members['response']['items'][$i]['bdate'] = "";}
June 10th 19 at 16:32
1 answer
June 10th 19 at 16:34
substr_count
if(substr_count($members['response']["items"][$i]["bdate"], '2.1', 2))
doing so but not working - ludie commented on June 10th 19 at 16:37
Get the value $members['response']["items"][$i]["bdate"] - nathaniel.Kautz commented on June 10th 19 at 16:40
there displays dates in this format, 3.1.1970, 3.1, 3.10.1983, 3.11.1992 - ludie commented on June 10th 19 at 16:43
,
$date = date("j.n"); // Current date (day.month)
if(substr($members['response']["items"][$i]["bdate"], 0, -5) == $date)

doing so displays so
5a4c9a9d4deb0026886490.png - ludie commented on June 10th 19 at 16:46
almost works, but displays are not purely for today - ludie commented on June 10th 19 at 16:49
$date = date("j.n"); // Current date (day.month)
if(substr($members['response']["items"][$i]["bdate"], 0, 3) == $date)
- nathaniel.Kautz commented on June 10th 19 at 16:52

Find more questions by tags VKontakte