Existing Code in PHP script needs analyzed.

I’m still somewhat new with php, and I’ve got a snippet of code that I cant quite seem to figure out, I was wondering if anyone here would be able to either help me figure how this works (sends a submitted form to an IP printer located in a building) or point me in the right direction to rewrite it.

[php] if($_POST[‘msg_to’] == ‘maintbuild1’) {
$prnfh = popen(‘html2ps | lp -d Maint’, ‘w’);
fwrite($prnfh, $htmlout);
// fwrite($footer);
pclose($prnfh);[/php]

What it is saying is

if you posted a message to the main building
connect to the printer named ‘html2ps | lp -d Maint’ and get ready to write
now we are set to write to a page with the connection prnfh we print the content htmlout
all finished close the connection

Sponsor our Newsletter | Privacy Policy | Terms of Service