RE: [PHP] Access a printer via PHP

From: Date: Wed, 07 Feb 2001 15:21:57 +0000
Subject: RE: [PHP] Access a printer via PHP
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-38545@lists.php.net to get a copy of this message
Thomas, You don't connect databases to printers. As you discerned, you could use a program to query the database and output the results to a printer. I f you absolutely MUST have it start printing AS SOON as the order is inserted into the database (and I challenge you to re-think that requirement) then the PHP script that adds it to the database needs to also output it to the printer. This might be the easiest way anyhow. Sorry, I've never tried to print from PHP so I don't know the specifics but one possible way to do it would be to open a file handle to your printer and write to it like it were any other file. My preference would be to write the order out to a file and then issue a system command to print that file. Cal http://www.calevans.com -----Original Message----- From: ThoVer Webproducties [mailto:info@thover.com] Sent: Wednesday, February 07, 2001 7:33 AM To: php-general@lists.php.net Subject: [PHP] Access a printer via PHP Hello, For an e-commerce project we want to connect the mySQL-database we created to a printer (attached to a computer which has 24h internet [and mySQL database] access). I assume it's different to couple the mySQL-database directly to a printer. We are however accessing the database via PHP, so I think it might be possible to send a command to a printer directly from the PHP file which puts the data into the database as well. We want to do this in order to have an order via the website printed directly. In fact, the printer should start printing as soon as an order is added to the seperate table in the mySQL database (by a special PHP document). Does anyone know whether this is possible and, if it's possible, could you tell me how? Thanks in advance, Thomas. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net For additional commands, e-mail: php-general-help@lists.php.net To contact the list administrators, e-mail: php-list-admin@lists.php.net

« previous php.general (#38545) next »