Hello
My name is Janos and I'd like to help you on this. I understand the text file is being created by PHP already and we must print it locally to the default (or predefined) printer.
I will do this by writing the text file to disk, then recording the filename in mysql and having a separate windows app that reads mysql for new text file filenames and sends them to the configured printer automatically (within seconds).
Assuming you can provide help testing the application we can finish it in 2 days.
I will develop the app for Windows, using .Net - am able to provide future help if and when needed.
I look forward to working with you.
Janos