<?php

$request = file_get_contents("https://sc2.afzoneh-nevis.com/test/cloudsnap/API_randtests/api.php?list_all&api_token=IuLzryIFBE6hh2JwF32TJVbDRdHVsUmm6fbdbyb2gefVIOUbV8mMu99M6Oc8WseO");
$response = json_decode($request, true);

foreach ($response as $decoded) {
    $from_id = explode("-",$decoded['name'])[0];
    if(isset(explode("-",$decoded['name'])[2])){
        echo 'yes      |';
        $daysm = explode("-",$decoded['name'])[2] - $decoded['day'];
        if($daysm == '0'){
            $delete++;
        }
    }else{
        if($user['coin'] >= $payhour){
            $online10++;
            $payconfirm10+=$payhour;
        }else{
            
        }
    }
}