How to use PHP to control lights and air conditioning?
X10 / Insteon are good bets. I saw they both have developer kits. You should at least but some modules for the fixtures / outputs that you want to control. I would stay away from the AC unit and just buy a programmable thermostat;) In the end, you will have to do research and buy some interface hardware and control modules. X10 / Insteon is probably the cheapest way to get to you.
Getting started: I personally used the X10 and it was quite easy to use, simple serial / COM interface to trigger the backlight. I don't have any more code, besides, I feel like you are looking for a copy-n-paste solution without thinking about the problem. Even if there is an API in Java / C / C ++ / Python / etc ... you can find a way to call it from PHP. By asking a more specific question, you can get a more specific answer. Also, don't ask for a language that you admit you don't know.
source to share
Most, if not all PC digital I / O cards are controlled through an interface written in C. Then most of them offer a library so you can control the boards through software you write. Since you can build extensions for both of these languages in C, you can actually write a Java or PHP wrapper around the C library for a digital I / O card and control just about anything that can be controlled with a digital signal.
For example, Google quickly included the HW-Group IO Controller with libraries in Java and PHP (among others) and from 8 to, 8 from DIO.
source to share
X10 devices can be used, for example, to drive Lava lamps for extreme feedback in continuous integration. There is a lot of literature on the Internet on this subject. Check out the X10 CM17A API and Bubble, Bubble, Build In Trouble for real world use.
source to share