PHP-Fusion Development

get_http_response_code()

Get HTTP response code.

Versions: 9

get_http_response_code( string $url ) : mixed

Parameters

$url (string) (Required) URL.

Return Values

(bool|string)

Examples

$url = 'https://www.google.com/';
if (get_http_response_code($url) == 200) {
//
}