how to get specific data from the web server code?

I need help in getting data from the web server code.

I am sending words to a web server using the Ethernet web server code from the 1st Ethernet shield and need the 2nd Ethernet shield to get specific word (eg. Yes) from the web server (using the web client code).

However, I am not able to do so. I try using :

if (client.available())
{
char c = client.read();
if(c=='Yes')
{
Serial.print("Yes obtained");
}

Hi Crays,

First of all you need to understand a little bit of what you are trying to do... This should be a nice start:
http://arduino.cc/en/Reference/Char
http://arduino.cc/en/Reference/String

if (client.available())
{
char c = client.read();
if(c=='Yes')
{
Serial.print("Yes obtained");
}

Until the client.read line you are doing fine, but you are trying to compare a char (a single letter like 'Y') to a word "Yes", so it will never be true...

To do that you will need to check the first letter ('Y'), then the second letter ('e') then the third letter ('s'). This is called a state machine.

Or you can save the incomming characters to a char array (string) and then compare it using strcmp.
http://www.cplusplus.com/reference/cstring/strcmp/