Hello.
There is a script. The script accesses a third-party resource via CURL. If a third-party resource falls or long handles the request, then the script, trying to wait for a response, either crashes or "hangs".
There is an option to use CURLOPT_TIMEOUT or CURLOPT_TIMEOUT_MS. But I don't see any reason to send data to someone else's server if it is unavailable, and if available the response time it will be obviously more time the life of the script.
Is there a way to "pinganut" third-party resource with php?