I was wondering if there was a way to select all text on a web page, and copy it to clipboard on button click.

I have a PHP script that `echo`s the output of `dmesg` on my server, and I want a way to copy all text on button click.