problem with arduino ethernet connection

hai guys…
Im doing a project on smart appliance control. I need to control the appliances using ethernet. In the GUI there are ON/OFF switches corresponding to each appliance. If i click on a switch, a character will be stored in a text file. So i need to read that file using ethernet. Also meter reading(‘value’) should be uploaded. I am using the following code and on running, the meter reading is getting uploaded but appliance status is not changing. I am posting my code. Your help in any manner is most appreciated.
#include <SPI.h>
#include <Ethernet.h>
float value=0.75;
int c;
byte mac = {0x90, 0xA2, 0xDA, 0x0F, 0x3E, 0x9F};

// Enter the IP address for Arduino, as mentioned we will use 192.168.0.16
// Be careful to use , insetead of . when you enter the address here
IPAddress ip(169,254,229,5);
char server = “169.254.229.8”;
EthernetClient client;
void setup() {
Serial.begin(9600);
Ethernet.begin(mac, ip);
}

void loop() {
// Connect to the server (your computer or web page)
if (client.connect(server, 80)) {
client.print(“GET /example/project/page2.php?”);
client.print(“value=”);
client.print(value);
client.println(" HTTP/1.1");
client.println(“Host:169.254.229.8”);
client.println();
}

else {
Serial.println("–> connection failed\n");
}

if(client.connected()){
client.println(“GET http://example/project/LEDstate.txt”); //download text
client.println(“Host:169.254.229.8”);
client.println(); //end of get request
if (client.available()) {
int c = client.read();
Serial.println(c);
}

if (c==‘1’){
Serial.println(" on");
}
if (c==‘4’){
Serial.println(“off”);
}
client.stop();
}

else{

client.stop();
}
}

      client.println("GET http://example/project/LEDstate.txt"); //download text
    client.println("Host:169.254.229.8");
   client.println(); //end of get request
    if (client.available()) {
   int c = client.read();
       Serial.println(c);  
  }

Two problems: 1: You assume that data from the server will be available immediately after sending the request. 2: Inside the 'if' you create a local variable 'c' which is different from the global variable 'c'. Since they are two different variables the value you read won't be in the global when you look at it later.