these two functions cause a warning. Do I have a way to catch him?
. , E_WARNING ; , , - . , , , , : display_errors php.ini .
, , , , , . get_headers, , , , "HTTP/1.1 404 Not Found". :
<?php
$url = 'http://stackoverflow.com';
$headers = get_headers( $yoururl );
preg_match( '~HTTP/1.(?:1|0) (\d{3})~', $headers[0], $matches );
$code = $matches[1];
if( $code === '200' ) {
$tags = get_meta_tags( $url );
}
, , 200 - ; 304 - , .