I have a server with ip 192.168.0.1, then I have a computer with ip 192.168.0.3 which access the server. I have a printer EPSON TM-U220 connected to 192.168.0.3, then I tried to print from the server to the printer using php command
copy($file, '//192.168.0.3/printername');
but it doesn't work, then I tried another function:
exec("print /d:\\\\192.168.0.3\\printername $file");
exec("copy $file \\\\192.168.0.3\\printername");
It says "unable to initialize device \\192.168.0.3\printername"
.
My computer and server run on windows7.
I already shared the printer to my server, I can test print page from the server. how do I print to my network printer using PHP?
Thanks