Re: [PHP3] Printing from Web Server
| From: | Colin McKinnon | Date: | Mon, 07 Aug 2000 12:17:20 +0000 |
| Subject: | Re: [PHP3] Printing from Web Server | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-10455@lists.php.net to get a copy of this message | ||
Victor wrote:
>I've already downloaded curl and htmldoc following the www.freshmeat.net
>links.
>I've written a simple script using htmldoc and It works pretty well.
>
>Why are you using "curl" ? Please, give me an example. -victor
'cos I've got PHP running as an Apache module, so I have to invoke the
webserver to generate the html page from the PHP source - hope that answers
your question. There are other tools I could use (wget, or lynx -dump, or
even sock <myscript.input) but I find curl works well, and I'm already
using it for other stuff.
/* curl | htmldoc | lpr */
$exstr="/usr/local/bin/curl -s \"http://localhost$url\" | ";
$exstr=$exstr . "/usr/bin/htmldoc --no-title --no-toc
--size a4 --fontsize 9 -t ps - | ";
$exstr=$exstr . "lpr -Phplaser ";
exec($exstr);
print "Should have generated and printed report on
<em>hplaser</em>";
HTH
Colin