The codes will only works if the printer attached to the server.
As far as I know, the client side printing by requesting data from server can be done by using javascript (ie. client side scripting) and/or XML
I wonder if there is the way to "php print" on the remote clients (such as Point of Sales)