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 ?