Re: Printing using php script CRON

From: Date: Tue, 27 Jul 2004 13:00:43 +0000
Subject: Re: Printing using php script CRON
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-191966@lists.php.net to get a copy of this message
On Tuesday 27 July 2004 08:33 am, Vern wrote: > Actually it's a netwotl printer and in order to print the job I need to > type the following on the box: > >     lpr -P hp1300n myfilename.txt > > So I'm not exctaly sure how I can do that This works great for me. Except that I use lp -d printername filename.txt instead of the command you're using. I can print to any printer that I set up in CUPS on the webserver. I do this from webpages so I'm sure you can get it to work with CRON. $filename = uniqid("").".txt"; $filehandle = fopen($filename,"w"); fwrite($filehandle, "Hello World"); fclose($filehandle); system("lpr -P hp1300n ".$filename); James

« previous php.general (#191966) next »