A friend of mine wrote recently on his blog:
Randall Munroe's XKCD has inspired interesting product features in the past. A recent one has sent a lot of Mac users scurrying to set up an audio doorbell on their Mac Minis.
<?php
if (isset($_GET['say'])) {
$cmd = sprintf('say "%s"', preg_replace('/[^\w\d ]/', '', $_GET['say']));
`$cmd`;
} else if (isset($_GET['up'])) {
$cmd = 'set output_vol to output volume of (get volume settings)
set volume output volume (output_vol + 10)';
`osascript -e "$cmd"`;
} else if (isset($_GET['down'])) {
$cmd = 'set output_vol to output volume of (get volume settings)
set volume output volume (output_vol - 10)';
`osascript -e "$cmd"`;
}
?>
<form action="<?= $_SERVER['PHP_SELF'] ?>" method="get">
<p><input type="text" name="say">
<input type="submit" value="Say"></p>
<p>Volume:
<input type="submit" name="up" value="Up">
<input type="submit" name="down" value="Down"></p>
</form>
<p>Hey Randall, here's how you
<a href="http://xkcd.com/530/">change the volume</a>.<br/>
–<a href="http://manas.tungare.name/">Manas</a>.
</p>For a more detailed walk through, see the original post on my friend's blog.
[robg adds: We've had a lot of hints on using say in Terminal, but as far as I can tell, we've not run anything about changing the remote Mac's volume settings.]

