Moved all Greyhound output to stderr so it will show up in AmaroK error messages; corrected some HTML bugs in the readme
authorDan
Mon, 24 Mar 2008 00:12:21 -0400
changeset 9 63a257541313
parent 8 a8d108f37363
child 10 d3059e20b0fa
Moved all Greyhound output to stderr so it will show up in AmaroK error messages; corrected some HTML bugs in the readme
README
functions.php
--- a/README	Sun Mar 23 23:55:50 2008 -0400
+++ b/README	Mon Mar 24 00:12:21 2008 -0400
@@ -1,13 +1,16 @@
 <div align="center">
   <b>Greyhound</b><br />
-  A PHP-based web interface for Amarok
+  A PHP-based web interface for Amarok<br />
+  <br />
+  &gt;&gt;&gt; <b>To access this script once started navigate to: &lt;&lt;&lt;<br />
+  &gt;&gt;&gt; <a href="http://localhost:7447/">http://localhost:7447/</a> &lt;&lt;&lt;
 </div>
 <p>I wrote Greyhound because of some issues I was having with other web
    interface scripts freezing and not working right. Greyhound is my first
    shot at writing Amarok scripts but it seems to work pretty well.
    </p>
 <p>Greyhound's interface is based on the WebControl script by Jonas Christian
-   Drewsen, André Kelpe, and Peter C. Ndikuwera. However unlike WebControl
+   Drewsen, Andr&#0233; Kelpe, and Peter C. Ndikuwera. However unlike WebControl
    Greyhound is written entirely in PHP, making it a bit more portable. This
    script doesn't require an external web server to run, it has a relatively
    basic built-in (single-threaded) server.</p>
--- a/functions.php	Sun Mar 23 23:55:50 2008 -0400
+++ b/functions.php	Mon Mar 24 00:12:21 2008 -0400
@@ -24,8 +24,10 @@
 
 function burnout($msg)
 {
-  echo "\x1B[31;1m[Greyhound] fatal: \x1B[37;1m";
-  echo "$msg\x1B[0m\n";
+  $h = @fopen('php://stderr', 'w');
+  fwrite($h, "\x1B[31;1m[Greyhound] fatal: \x1B[37;1m");
+  fwrite($h, "$msg\x1B[0m\n");
+  fclose($h);
   exit(1);
 }
 
@@ -36,7 +38,9 @@
 
 function status($msg)
 {
-  echo "\x1B[32;1m[Greyhound] \x1B[32;0m$msg\x1B[0m\n";
+  $h = @fopen('php://stderr', 'w');
+  fwrite($h, "\x1B[32;1m[Greyhound] \x1B[32;0m$msg\x1B[0m\n");
+  fclose($h);
 }
 
 /**