// Function to find a string in a buffer, and return a pointer to the first char after the end of the match// Returns pointer to NULL if a pattern is not found// This function is designed to fing the search string across multiple buffers, and uses the patternInProgress pinter to store partial pattern matches// The calling code needs to maintain patternInProgress between subsequent calls to the function.char *multiBufferFindPattern(char *buffer,char *searchString,char *patternInProgress){ while (*buffer && *patternInProgress) { if (*buffer == *patternInProgress) { patternInProgress++; } else { patternInProgress=searchString;// reset to start of the pattern } buffer++; } if (!*patternInProgress) { return buffer; } return NULL;}

// request 2 remove otherstatic void browseUrlCallback (byte status, word off, word len){ char *pos;// used for buffer searching pos=(char *)(Ethernet::buffer+off); Ethernet::buffer[off+len] = 0;// set the byte after the end of the buffer to zero to act as an end marker (also handy for displaying the buffer as a string) Serial.println((const char*) Ethernet::buffer + off);

if (foundPatternState==1) { pos = multiBufferFindPattern(pos,searchPattern[0],searchPatternProgressPtr); if (pos) { foundPatternState=2; outputBufferPtr=displayBuff; memset(displayBuff,'0',sizeof(displayBuff));// clear the output display buffer displayBuff[sizeof(displayBuff)-1]=0;//end of buffer marker } else { return;// Need to wait for next buffer, so just return to save processing the other if states } }

//Using SoftwareSerial Library to locate the serial pins off the default set//This allows the Arduino to be updated via USB with no conflict#define RxPin 5 //Pin to read data from Reader #define TxPin 4 //Pin to write data to the Reader NOTE: The reader doesn't get written to, don't connect this line.SoftwareSerial RFIDReader(RxPin,TxPin);