Question
I am looking for some sort of thing that I could plug a lamp into that would then plugin into the wall that would allow me to control it (ie turn it on and off) via a web interface, or via a web API (for use with other programs that I could write).
Does such a product exist?
Answer
You could use power-line signaling such as X10. Warning: X10 is extremely spammy.
Or an RF-based system using Z-Wave products.
Check more discussion of this question.