Hi all,
Is it possible to retrieve a webclient’s IP when visiting my webserver (for example: (ESP32-cam/Module3/ Unit3)/
or the other Two Button webserver in your examples?
What code ,or where can I find it to apply to my Sketch?
thank you very much for your answer,
Alex
3 Answers
Hi.
Take a look at the following tutorial. I think it is exactly what you’re looking for:
server.on("/printIp", HTTP_GET, [](AsyncWebServerRequest *request){
request->send(200, "text/plain", "ok");
Serial.print("Received request from client with IP: ");
Serial.println(request->client()->remoteIP());
});
Regards,
Sara