arduino uno + ethernet how to run a php schript

i have done one web server with 4 buttons to control 4 i/o in my arduino .. but my probles is to run a password_protect.php this php is for asking a password before enter in main site i run this script in my windows xp with WAMP server and run perfect if i put the file in my sd and run from my web server 192.168.1.100/possword_protect.php open the file but not see anything .. how run a php file to work ?

with this code in my arduino the page run but not see anything

if (StrContains(HTTP_req, "GET / ")
                                 || StrContains(HTTP_req, "GET /index.php")) {
                        webFile = SD.open("index.php");        // open web page file
                    }       // open web page file
                      else if (StrContains(HTTP_req, "GET /password_protect.php")) {
                        webFile = SD.open("password_protect.php");        // open web page file
                    }
                     else if (StrContains(HTTP_req, "GET /lcd.txt")) {
                        webFile = SD.open("lcd.txt");        // open web page file
                    }
                        if (webFile) {
                            while(webFile.available()) {
                                client.write(webFile.read()); // send web page to client
                            }
                            webFile.close();
                        }
                    }

the index.php is a file in htm but i rename it in php to include the password_protect php. the index.php run but not see the password protect..
if i run this in my xamp server in windows its work perfect. why this ?

The Arduino ethernet library does not support php by default. If the file contains php code, you must program your Arduino to perform all the php stuff in the file. Otherwise, it will send the file to the web browser as a html document.

how i must program my Arduino to perform all the php stuff in the file ? can you help me how to serch for this ? one example ? thanks :slight_smile:

how i must program my Arduino to perform all the php stuff in the file ? can you help me how to serch for this ? one example ?

Pretty simple, really. Go to php.org, and download the version for the Arduino.

Of course, you'll not find one. So, download the source, and build it for the Arduino. Be sure to pay attention to how much memory it needs, and how big the resulting executable is.