ESP8266Client client;

client.connect("192.168.100.100", 5000, "/abc.php");

client.read();

client.stop();

the ESP8266 Client does not have 3rd parameter

can anyone provide me example on how to GET"192.168.100:5000/abc.php"

closed as unclear what you're asking by Juraj, sempaiscuba, gre_gor, Greenonline, MatsK Dec 4 at 10:53

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

  • 1
    WiFiClient example – Juraj Nov 29 at 13:30
  • Use ESP8266HTTPClient instead. ESP8266Client only creates a TCP connection. You need to send HTTP over a TCP connection. – Gerben Dec 3 at 16:02

an example that uses it: https://github.com/esp8266/Arduino/blob/master/doc/esp8266wifi/client-examples.rst

so, probably something like:

host = "192.168.100.100";
port = 5000;
client.connect(host, port);

//I'm not sure if the port goes in the HTTP headers
client.print(String("GET /") + " HTTP/1.1\r\n" +
         "Host: " + host + ":" + port + "\r\n" +
         "Connection: close\r\n" +
         "\r\n"
         );

Serial.println("[Response:]");
while (client.connected() || client.available())
{
  if (client.available())
  {
    String line = client.readStringUntil('\n');
    Serial.println(line);
  }
}
client.stop();

Not the answer you're looking for? Browse other questions tagged or ask your own question.