0

I am just interested, but I would like to run a webpage with php on my arduino ethernet. I would like to be able to store my webpage on the sd card as well.

does anyone know of a library that would let me do this?

  • Please clarify, are you expecting to run PHP code from the Arduino too? Because that won't work. – deltaray Jul 23 '16 at 0:41
  • I want to be able to have a php document on the sd card, and the arduino to run it. – Hazzdood Jul 23 '16 at 0:43
1

Loading a file off an sdcard and displaying it on port 80 isn't hard. Just check out the 'Ethernet' library and the 'SD' library.

I don't want to discourage you too much about the PHP part, but you won't be able to load the official PHP interpreter onto the Arduino. Simply not enough memory available.

However, if you just want to have dynamic website such as display variables or output from sensors, then you could write your own code interpreter for dynamic web pages that would fit in the memory of an Arduino, just think a bit smaller in scope as far as what it can handle. Maybe you'll end up writing a new library for dynamic webpages for Arduino sensor data.

If you really need to run a PHP interpreter then you can try something like a Rapsberry Pi and hook it up to the Arduino for sensor input using the I2C protocol.

0

Thats not possible, only if you write yourself a PHP interpreter, which I suspect won't fit inside an Arduino.

You might be able to create your own interpreter for simple Get and POST requests, but bear in mind that HTTP, and even TCP are very sophisticated protocols to run on an AVR. You might want stick with simple things, preferentially with small messages as you also have very little RAM on those MCUs.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.