cfmgrv4 init...3

This commit is contained in:
최준흠 2024-10-21 09:32:49 +09:00
parent 4e4c53bee0
commit e1667ef5ae

View File

@ -70,10 +70,12 @@ abstract class Cloudflare
usleep(100000); // 0.1초 대기 usleep(100000); // 0.1초 대기
$response = $this->reload_page($uri, $i, $per_page); $response = $this->reload_page($uri, $i, $per_page);
$body = json_decode($response->getBody()); $body = json_decode($response->getBody());
if (!is_object($body->result) || get_class($body->result) !== 'stdClass') { foreach ($body->result as $result) {
log_message("error", "body->result is not a stdClass:\n" . var_export($body->result, true) . "\n"); if (!is_object($result) || get_class($result) !== 'stdClass') {
} else { log_message("error", "Cloudflare: result is not a stdClass:\n" . var_export($result, true) . "\n");
$results = array_merge($results, $body->result); } else {
array_push($results, $body->result);
}
} }
log_message("notice", "현재: page[{$i}/{$total_page}] , result수[" . count($results) . "]"); log_message("notice", "현재: page[{$i}/{$total_page}] , result수[" . count($results) . "]");
} }