You can't, unless you want to save the actual output of your site that's sent to the user. For this, you can use output buffering: http://us2.php.net/manual/en/ref.outcontrol.php Keep in mind that PHP is executed on the server-side, before data is sent to a browser. There are no libraries for turning HTML output into displayable format to take a "screen capture" of, since that would be kind of pointless.
That's not exactly true... there is (apparently) a PHP extension (as in a compiled library) out there that does this, though I can't remember the name of it. There's got to be at least a dozen threads here that have asked the same question: do some decent searching and they'll show up.