0

Hello,
I am really new at using PHP and can anyone help me out on printing a web page using Php?

Thank you.
Sam

3
Contributors
2
Replies
3
Views
7 Years
Discussion Span
Last Post by Stefano Mtangoo
0

Good explanations from this post

PHP cannot easily control the client's browser, except indirectly by generating Javascript which does.

The "problem" is that PHP's work is finished once it generates the page to be sent to the browser. PHP is run on the server,

Javascript, as it is normally encountered, is client-side technology, that is, it runs on the client's browser, not on the web server. (There is server-side javascript, but it only works with Netscape's server, IIRC).

You *could* work out a system where the PHP script establishes a TCP connection to the client's computer and sends a file to the client's own printer (e.g. using a combination of popen() and ssh), but

(a) there are going to be major security issues here,
and
(b) you need tight control over *both ends* of the connection (client and server); you will simply not find a solution that will work on most client's machines.

May this be informative,

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.