Server response problem!

Hi, I have a problem with program. Program reads rfid tag next send get request to server and waits for response. If response is true, Program will open the door. I have problem with receiving server response. And i have no idea how to search in response for true.

#include <Wiegand.h>
#include <UIPEthernet.h>
WIEGAND wg;
int door = 1;
 
byte mac[] = { 0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED };
IPAddress ip(192, 168, 1, 179); 
byte server[] = { 192, 168, 1, 18 }; // ip serwera
EthernetClient client;
 
void setup() {
    wg.begin();
    
     pinMode(7, OUTPUT);
     pinMode(8, OUTPUT);
     pinMode(9, OUTPUT);
     
     Serial.begin(9600);
}
 
void loop() {
  if(wg.available()){
    Ethernet.begin(mac, ip);
            unsigned long cardId = wg.getCode(); //kod karty
            Serial.print(cardId);
            
            String a = getHttpHeader(cardId,door); //string z get
            Serial.println("connecting...");
            
              if (client.connect(server, 80)) {
                  Serial.println("connected");
                  client.println(a);
                  client.println();
                  boolean result = ServerRequest(); 
                    if(result == true){
                         AccessGranted();
                    }
                    else{
                         AccessDenied();
                    }
              }
              else {
                  Serial.println("connection failed");
                  loop();
              }
  }
  
 
}
boolean ServerRequest(){  //zosta ta funkcja 
 if (client.available()) {
    char c = client.read();
   
    
    Serial.print(c);
  }
 
  if (!client.connected()) {
    Serial.println();
    Serial.println("disconnecting.");
    client.stop();
    for(;;);
  }
}
 
void AccessDenied() {  //zamykanie
  delay(100);
  digitalWrite(8, HIGH);
  delay(100);
  digitalWrite(8, LOW);
  delay(100);
  digitalWrite(8, HIGH);
  delay(100);
  digitalWrite(8, LOW);
  loop();;
  
}
 
void AccessGranted() {  //otwieranie
  digitalWrite(7, HIGH);
  digitalWrite(9, HIGH);
  delay(5000);
  digitalWrite(9, LOW);
  digitalWrite(7, LOW);
  loop();
}
 
String getHttpHeader(unsigned long CardId, word door) {  //Tworzenie zapytania get
 String getBegin = F("GET /auth/door.php");
 String getId = F("?id=");
 String getDoor = F("&door=");
 String getEnd = F(" HTTP/1.1\r\nHost: 10.0.0.22\r\n\r\n");
 return getBegin + getId + CardId + getDoor + door + getEnd;
}

Reciving request from server doesn’t work. And i have no idea how to serch for true in response.

    Ethernet.begin(mac, ip);

This belongs in setup(), not loop(). You start the communication with the Ethernet shield ONCE!

 String getBegin = F("GET /auth/door.php");
 String getId = F("?id=");
 String getDoor = F("&door=");
 String getEnd = F(" HTTP/1.1\r\nHost: 10.0.0.22\r\n\r\n");

Nonsense. The F() macro can not be used this way. There is no sense trying to keep string literals out of SRAM while simultaneously pissing away resources on the String class.

 return getBegin + getId + CardId + getDoor + door + getEnd;

How is ADDing a bunch of String instances and a long and a word (whatever the f**k that is) supposed to work?

Reciving request from server doesn't work.

Almost certainly because you haven't gotten a valid request TO the server. Stop the nonsense with Strings. Send the pieces one at a time to the server, or use sprintf() to construct a single statement.