Each time a button on the page is pressed, the case statement happens and the "file" (really the port) is opened, put into write mode, a single ASCII ...
Here's how to make your Arduino do things from over the internet without an ethernet or wifi shield. This is a simple way to make your project controllable from anywhere in the world!
Step 1: Platform Compatability
This method WILL NOT work under Windows. I can't tell you how long it took me to figure that out. The command we're using, fopen() is not implemented the same way under Windows and Linux, so you have to use Linux. Never used it before? Don't panic, it's not that bad.