Before, we can help you out, can you elaborate on how you are planning to retrieve the actual information? It can make a significant difference in how you would go about it... The basic idea, though, is to probable compare each line using the substr function...
For example, this assumes you have each line fed into an array called lines and are looping through that array...
for($i = 0; $i < count($lines); $i++) {
if(substr($lines[$i], 0, 4) == "KSMO") {
// do something with the line
}
}