Search for "ESP8266-ping" name in Arduino IDE libary manager, or get the entire repository zipfile and decompress it in your libraris directory.
To the dynamic configuration for joining to WLAN with SSID and PSK accordingly. It an Arduino library united with ESP8266WebServer class of ESP8266 or WebServer class of ESP32. Easily implementing the ...