PHP question: controlling Arduino over Ethernet using LAMP

Thx SurferTim, but I got that part figured out pretty well!

Unfortunately polling the sensor is just the first step, a test to establish communication from the apache server to the arduino; the end goal is much more sophisticated: ultimately I want to be able to have a network that can handle dozens of sensor stations, with potentially hundreds of individual sensors. I want to be able to remotely adjust all kinds of settings on the sensor stations: recalibrating sensors, changing sensors poll intervals, setting clock chips, downloading/clearing micro sd backup data to name just a few. I don't know if the continuous polling method is suitable for a scenario where I want a large and growing number of sensor stations, that just seems like it would spell out trouble; wouldn't I essentially be doing a DDOS attack on my own server?

Is there a way that I could just execute a php GET on the server that contains a predefined data (maybe just a single character) and targets the IP of the Arduino sensor station? Does the Arduino have to answer in a specific way for the transaction to be completed?

I think what I am trying to do is possible, I just can't quite wrap my head around the actual coding part of it. I've been looking for some kind of example code, even if it were just some one who turned a LED on and off using a PHP script on an apache server with the arduino connected ethernet. Anyways, I appreciate all ideas and suggestions :slight_smile: