Hi,
Thanks in advance for any help this receives.
I have two setups consisting of and Arduino UNO and Ethernet v2 Shield (from arduino.org, uses the Ethernet2 library not the standard Ethernet one, Arduino - Home)
These are then hooked up to an adafruit fingerprint sensor (Fingerprint sensor : ID 751 : $49.95 : Adafruit Industries, Unique & fun DIY electronics and kits) to validate the users.
Im having an issue with the server side validation of the users, it doenst matter as such who the users are as long as two validate within a set time period, I have tried to do this on the server side and have come to the conclusion that I do not have the requisite programming knowledge. Below is some pseudo code for the approach I am asking for help about:
when setup1 receives timeStamp2
timer = 10secs
while timer !=0 {
valid = timeStamp1-timeStamp2
if (valid = +/-10) {
send flag (could be 1) to website
}
}
Server:
Valid = $_GET['valid']
if (valid == 1) {
send user to loggedin.php
}
The rest of the code is as an attachment due to length restrictions
I have included sections of code that were from previous implementation attempts in order to give an idea of approaches already attempted.
The server is an ubuntu 14.04 server running apache2, php5, ntp and mysql, it is a virtual machine running on vmware workstation.
As of this moment the code above queries the server for the unix time (the way I am attempting to work out whether the user has authenticated withing a set time) then for connectivity tests pulls back the index page. from here when a user authenticates the ethernet shield sends the variable to the server.
Any suggestions are much appreciated.
If you require any other information or would like specific details posted please let me know and I will reply asap.
Setup-One.ino (8.68 KB)