cfmgrv4 init...3
This commit is contained in:
parent
8846ee7eb3
commit
68d9526a37
@ -65,7 +65,14 @@ abstract class Cloudflare
|
|||||||
$per_page = $body->result_info->per_page;
|
$per_page = $body->result_info->per_page;
|
||||||
$total_page = $body->result_info->total_pages;
|
$total_page = $body->result_info->total_pages;
|
||||||
$total_count = $body->result_info->total_count;
|
$total_count = $body->result_info->total_count;
|
||||||
$results = [$body->result];
|
$results = [];
|
||||||
|
foreach ($body->result as $result) {
|
||||||
|
if (!is_object($result) || get_class($result) !== 'stdClass') {
|
||||||
|
log_message("error", "Cloudflare: result is not a stdClass:\n" . var_export($result, true) . "\n");
|
||||||
|
} else {
|
||||||
|
array_push($results, $result);
|
||||||
|
}
|
||||||
|
}
|
||||||
for ($i = $page + 1; $i <= $total_page; $i++) {
|
for ($i = $page + 1; $i <= $total_page; $i++) {
|
||||||
// API 제한을 고려한 지연 추가
|
// API 제한을 고려한 지연 추가
|
||||||
usleep(100000); // 0.1초 대기
|
usleep(100000); // 0.1초 대기
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user