Get HTTP response code.
get_http_response_code( string $url ) : mixed
$url (string) (Required) URL.
(bool|string)
$url = 'https://www.google.com/'; if (get_http_response_code($url) == 200) { // }