You can use a combination of the preg_grep() function and regular expressions to select the range of data that you want. The preg_grep() function returns all elements of an input array that match a certain regular expression pattern.
Here's an example of how you can use it to select the range of data that you want:
$start = preg_grep("/gpononu/", $array);
$start_key = key($start);
$end = preg_grep("/\b\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}\b/", $array);
$end_key = key($end);
$result = array_slice($array, $start_key, $end_key - $start_key + 1);
print_r($result);
This will give you an array containing the lines from the input array that match the pattern "gpononu" (line 9 and 13) until the first line that matches the pattern for IP addresses (line 11 and 15) You can use array_slice with 3rd parameter as $end_key - $start_key + 1 , this will give you desired result.