This is the code I wrote for my 3rd year project. I named the project SmartDoor because its objective was to design a system that opens a door lock using smartphone. The idea is really simple. I used an Arduino ethernet board(equivalent to the combination of Arduino Uno and Ethernet shield), which has an SD card slot and can host webpages. I made a simple webview based Android app(the code for which is not included here) which one can use to open or lock the door. For the dock lock mechanism, a custom made gripper was mounted on a Servo motor connected to Arduino.
The index.htm file was stored in the microSD card mounted on the Arduino. Upon receiving a GET request from a client(the Android app), the Arduino microcontroller reads the HTML file from the microSD card and sends it over the ethernet connection.