I’m trying to use the Http Client to return status codes for urls, however when the request timesout the script fails entirely
$http = new Client();
$response = $http->get($links[$i]['url'],,['timeout' => '10']);
$links[$i]['http_status'] = $response->statusCode();
I’d like to acknowledge the error, but keep looping through my list of urls. Simply extending the timeout is not enough as I have some urls that are no longer valid domains.