The phpgpio extension provides an API to control your GPIO's (with the [Wiring Pi](http://wiringpi.com) library).