No matching function for call to 'WiFiClient::connect(ESP8266WebServer&, int)

Hi all, I need some help.. I used WEMOS R1 to run the programme with ESP8266WebServer.h. But the error occur like this:

no matching function for call to 'WiFiClient::connect(ESP8266WebServer&, int)'

This is part of my programming:

#include <ESP8266WiFi.h>
#include <ESP8266WebServer.h>
#include "DHT.h"
......
......
void sending_to_phpmyadmin() //CONNECTING WITH MYSQL
{
WiFiClient client;
if (client.connect(server, 80)) {
Serial.println("connected");

// Make a HTTP request:
Serial.print("GET /home/sensor.php?humidity=");
client.print("GET /home/sensor.php?humidity="); 
Serial.println(humidityData);
client.print(humidityData);

.....

Is there any way to solve this?

how is server defineds?
shouldn't it be a c-string (e.g. "192.168.1.40")?

my server define like this:

ESP8266WebServer server(80);

Is the WiFiClient client syntax in ESP8266WebServer.h library? or any others syntax can replace it?

ok
what is the IP address of the server you are trying to connect to?

have you looked at this example
https://www.google.com/search?q=wifiClient+connect&rlz=1C1CHBF_enUS802US802&oq=wifiClient+connect&aqs=chrome..69i57j0i22i30l4j69i61j69i60l2.5558j1j7&sourceid=chrome&ie=UTF-8

I checked and its not using ESP8266WebServer.h.
My coding need to use ESP8266WebServer.h.

where did you say what the IP address is you are trying to connect to?

I want to connect to my domain : www.usm.com

where do you specify that in the code?
shouldn't that be the first argument to connect()?

i try to modify and no error occur :grinning: :grinning: as below:

char ESP8266Webserver[] = "usm.com";

if (client.connect(ESP8266Webserver, 80))