String analysis
I have a bunch of logs which I have a VB program which uploads to my PHP page as a POST query from an HTML page on the customer's PC.
So I have a heap of text results similar to below, and what I am wanting to do is to identify key data from the string.
Would you use RegEx, or simpler PHP sting handling functions?
Does anyone know of any log file analysis programs / APIs?
eg:
$testresults = explode(" ********", $rawtestresults);
echo $testresults[0]; //ping to local host
echo $testresults[1]; //ping to IP address
$rawtestresults will be a series of test like this below:
******** Testing ping to open DNS ... - OK! *******
Pinging 8.8.4.4 with 32 bytes of data:
Reply from 8.8.4.4: bytes=32 time=194ms TTL=53
Reply from 8.8.4.4: bytes=32 time=194ms TTL=53
Reply from 8.8.4.4: bytes=32 time=194ms TTL=53
Reply from 8.8.4.4: bytes=32 time=194ms TTL=53
Ping statistics for 8.8.4.4:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 194ms, Maximum = 194ms, Average = 194ms
-
Anthoni -
Thanks
{{ DiscussionBoard.errors[5321882].message }} -