hi all Does anybody have an idea about use php to control printer to print data
Any help or ideas would be apreciated.
PHP is a server side language so unless you want to control the printer attached to the server it is running on, PHP won't be able to print to a printer. The only way I can envision a way to have PHP control a printer on the client side is to have it communicate to a signed Java applet or (dare I say) ActiveX component. If you don't need massive amounts of control over the printer, you could probably have PHP spit out a couple Javascript commands that will allow you to bring up printer dialogs and such.
Check out ScriptX at http://www.meadroid.com they should have a solution for you.
If you want to use a printer attatched to your server you can use:
exec("lpr $filename");
or to print on the client side you can use an Active X control (this will only work with Internet Explorer).
For more info check out Micro$oft.