server sided html parsing?

March 18, 2009 at 07:38:10
Specs: Windows XP

the topic title speaks for itself I guess...
is there any way to parse html on the server, i.e. without sending it to the client side

the idea would be to parse html pages, and then sending those to a printer (I need the html layout)

right now I have this:

$filename = "print.php";

include $filename;
$contents = ob_get_contents();

$handle = printer_open("<printer_address>");

obviously this just gives me the raw html code, outputted by the print.php file

so how do I parse that html, and THEN send it to the printer?
thx in advance

See More: server sided html parsing?

Report •

March 31, 2009 at 09:33:13
Hi, for the HTML parsing, have you configured your ".htaccess" to allow HTML parsing (AddHandler, Addtype)? I believe that the handler directives instruct the server to parse the file types that you specify. Once enabled, you should be able to add SSI commands to those file types. To check your handler directives, go to your server's config file (typically called httpd.conf).

Regarding the print portion, are you using an Apache HTTP Server? If so and if you have version 1.2 or above, have you tried using the "printnav" function? "Printenv" outputs a listing of all existing variables with the associated values.

<!--#printenv -->

Report •
Related Solutions

Ask Question