ESP-8266 - I want send data to database in localhost

I have this code. I can connect to WiFi, but when esp try to connect to server, give me a error. What I should do?

#include <ESP8266WiFi.h>

const char* ssid = "ESP-8266";
const char* password = "esp8266imsi";
const char* server = "192.168.8.100";

WiFiClient client;
  
void setup() {   
        
  Serial.begin(115200);
  delay(10);

  WiFi.begin(ssid, password);
  Serial.println();
  Serial.println();
  Serial.print("Connecting to ");
  Serial.println(ssid);
  
  WiFi.begin(ssid, password);
  
  while (WiFi.status() != WL_CONNECTED) {
    delay(500);
    Serial.print(".");
  }
  Serial.println("");
  Serial.println("WiFi connected");
 
 
}
void loop() {
 
  Serial.print("Temperature: 25\n");
  if (client.connect(server,500)) { 
    String url = "/post-esp-data.php?humsolo=";
    url += ("25");
    url += ("&temp=");
    url += ("30");
    Serial.print("Requesting URL: ");
    Serial.println(url);
   
    // This will send the request to the server
    client.print(String("GET ") + url + " HTTP/1.1\r\n" +
                 "Host: " + server + "\r\n" +
                 "Connection: close\r\n\r\n");
  }
  else{
    Serial.println("Erro ao enviar!\n");
  }
  client.stop();
  
  Serial.println("Waiting...\n");   
  // delay between updates
  delay(30000);  //2 minute delay
}

Post the error.

Arduino dont give a specific error, only give me a message "Can´t connect"