The starting point is Felix Mueller's PowerSwitchII plugin. After installing this into SqueezeCenter, individual players can be configured to send a 3.3V DC signal when they are switched on. This signal appears at the headphone socket on a Squeezebox Classic (or Squeezebox 2), or the IR output on a Transporter.
Felix's solution to this problem is to step up the 3.3V output to a higher voltage using a transistor. That's fine, but it requires an external power supply.
The approach I took is simpler, and requires no power supply. I first saw it suggested by somebody on the Slim Devices forum - he calls himself "Hering", and lives in Vienna, but I know nothing more about him. I do wish to credit him nevertheless. (Come to think of it, I suppose he could be a she).
To switch the (very small) AC current required by the relay coil, we're going to use an opto-coupled triac. This is a device (often packaged in a 6-pin DIL format) that contains a triac, a LED and a photodetector. When a DC voltage of about 1.2V is applied to the LED, it emits light that causes the photodetector to switch on the triac, thus allowing the AC current to pass. The headphone/IR output on a Squeezebox/Transporter is more than capable of delivering the very small current drawn by the LED.
I live in the UK, and a convenient source for the opto-coupled triac is Maplins - they sell the Motorola MOC3020 for 99 pence (order code QQ10L). Equivalent devices from other manufacturers are the Toshiba TLP3041, Vishay K3020, Siemens BRT11, etc.
The 75 ohm resistor steps the 3.3V output from the Squeezebox or Transporter down to the 1.2V required by the opto-coupler. Note that all these figures are approximate - exact values are not that critical. A 100 ohm resistor would probably do just as well, and the voltage can be anywhere between about 1V and 1.5V.
I built mine into a box containing an IEC mains input socket, a 3.5mm jack socket to receive the 3.3V signal, and a couple of IEC mains output sockets to send power to my active speakers. The power relay is a heavy duty long life type able to switch 10A at 240VAC - smaller (and cheaper) power relays can be found if your current draw requirements are more modest. There's also an indicator LED to show when the power is on, fed with 240VAC from one of the output sockets (with a 100 kohm resistor in series to step the voltage down to the required level). Here's a picture of the device with its lid removed:
And that's it. A simple device that does the job. Nothing more to say.