<?php


if ( ! isset( $argv[1] ) )
    die( 'Data file name required' );


if ( ! $fh = fopen( $argv[1], 'r' ) )
    die ( 'Cannot open file: ' . $argv[1] );

while ( list( $date, $loc, $mag ) = fscanf( $fh,  ) ) {
    if ( $mag > 6 ) {
        printf( , $date, $loc, $mag );
    }
}

fclose( $fh );