Now to build it yourself.
To get the file name,
You can use this to loop through a directory.
Now that you have the file names use explode by space
If there will always be three values you need I would use the "list" example.
To get the contents of the file use,
I just use file_get_contents('somefile.txt')
Since you will have several entries in in your file you will need to explode by \
(newline) and use the 1st array example
Here you will need another loop (inside the readdir loop)
Where you will do yet another explode by space and again, I would use the 2nd list example. Don't forget the first and last name are separated by a space.
Here is where you would write to the database.
You have the first [date]
[time] values from the first explode by space then here you would have [ID] [name] from the last explode by space.
Since the first explode is outside of the /n explode those values will stay the same and on the next loop it will get the next [ID] [name] values.
If you are new to PHP and sounds like you want to learn, this will give you the planning and the links provided will pretty much build it for you.