mirror of
https://github.com/rekryt/iplist.git
synced 2026-08-27 04:05:30 +00:00
feat: chunk wildcard domains response into 300-line blocks with 5 empty lines between
This commit is contained in:
parent
84412cb1a4
commit
853d2bebe7
1 changed files with 12 additions and 0 deletions
|
|
@ -16,4 +16,16 @@ class WildcardController extends TextController {
|
|||
$this->request->setQueryParameter('wildcard', '1');
|
||||
return parent::getBody();
|
||||
}
|
||||
|
||||
protected function render(array $response): string {
|
||||
$chunks = array_chunk($response, 300);
|
||||
|
||||
$result = [];
|
||||
foreach ($chunks as $chunk) {
|
||||
$result[] = implode(self::DELIMITER, $chunk);
|
||||
}
|
||||
|
||||
// 5 пустых строк между блоками
|
||||
return implode(str_repeat(self::DELIMITER, 6), $result);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue