title: Extracting data from text log file advice
body: <p>I would like an advice on best approach on this task.</p>
  
  <p>I have a text log file holding data from a gps, this is the format:</p>
  
  <pre><code>time,lat,lon,elevation,accuracy,bearing,speed
  
  2014-07-08T12:56:52Z,56.187344,10.192660,116.400024,5.000000,285.000000,1.063350
  
  2014-07-08T12:56:58Z,56.187299,10.192754,113.799988,5.000000,161.000000,3.753000
  
  2014-07-08T12:57:07Z,56.186922,10.193048,129.200012,5.000000,159.000000,5.254200
  
  2014-07-08T12:57:13Z,56.186694,10.193133,109.799988,5.000000,152.000000,3.878100
  
  2014-07-08T12:57:16Z,56.186745,10.193304,142.900024,5.000000,149.000000,3.940650
  
  2014-07-08T12:57:20Z,56.186448,10.193417,118.700012,5.000000,154.000000,2.376900
  
  2014-07-08T12:57:27Z,56.186492,10.193820,131.299988,5.000000,65.000000,5.379300
  </code></pre>
  
  <p>I need to find the line where the speed exceeds a certain value, then get the time from that line, then scroll trough the lines and find the line where the speed is below this value, get the time and write these 2 time values into my database.</p>
  
  <p>This has to be an automated task, so I assume that a cron PHP script could do the job.</p>
  
  <p>Best regards Thomas</p>