0
Hello, I have a certain log file, and would like to capture certain data from it and store in [].
see the log file:
+++ Statistics Dump +++ (1499195839)
++ Incoming Requests ++
552 QUERY
++ Incoming Queries ++
546 A
1 NS
5 AAAA
++ Outgoing Queries ++
[View: default]
1350 A
53 NS
446 AAAA
544 DS
35 DNSKEY
[View: _bind]
++ Name Server Statistics ++
552 IPv4 requests received
1 requests with EDNS(0) received
550 responses sent
1 responses with EDNS(0) sent
300 queries resulted in successful answer
541 queries resulted in non authoritative answer
6 queries resulted in nxrrset
9 queries resulted in SERVFAIL
235 queries resulted in NXDOMAIN
385 queries caused recursion
2 duplicate queries received
++ Zone Maintenance Statistics ++
++ Resolver Statistics ++
[Common]
Now via php I would like to take for example the 3 line given 552 and print like this: [552].
Thank you.
It’s just that or you’ll need to pick up more stuff, like the details in front of the number and split them up
++
in an item of a "multidimensional array"?– Guilherme Nascimento
@Guilhermebirth if I could: [552] query [546] A [1] NS [5]AAAA is already of good size.
– Osni Junior
Okay, but you’ll only need 552 or you’ll need to split into blocks for each "group" (which used the sign
++
)? For example:++ Incoming Queries ++
would be a group and++ Incoming Requests ++
would be another.– Guilherme Nascimento
I’ll need the 552. Thanks @Guilhermenascimento.
– Osni Junior