+ if (defined('STDIN')) {
+ exec ("notify-send \"".$output."\"");
+ echo $output;
+ }
+}
+
+// if we're not running in the CLI, output HTML
+// to get a web-based version of this script.
+// obviously, the web server needs to run on a machine that has Steam running.
+if (!defined('STDIN')) {
+ echo '<html>';
+ echo '<head>';
+ echo '<meta http-equiv="refresh" content="60">';
+ echo '<title>Steam Shader Stats</title>';
+ echo '</head>';
+ echo '<body>';
+ echo '<h1>Steam Shader Stats</h1>';
+ echo '<p>This page displays the current status of Steam shader processing.';
+ echo '<br>The page will be auto-refreshed every minute.</p>';
+ echo '<h3>'.$output.'</h3>';
+ echo '</body>';
+ echo '</html>';