In writing and troubleshooting a web based PHP application that (among other things) installs instances of software, I realized that the user was receiving no feedback as the installation progressed. However, several logs were being produced from system calls, so I set these up to tee the output and replaced my system() calls with passthru() calls.
I required a method of reliably providing a "Link To This Page" in a cross browser and cross OS environment. After searching around on the web, I decided nothing quite fit and so created my own solution. This code should reliably work in Mozilla, IE, and Opera browsers, but should also fail gracefully in any environment where it errors out or cannot find and appropriate "hook".