$method()); } } return $messages; } /** * Check if file exists on given URL. * * @param $url * @return bool * @throws \GuzzleHttp\Exception\GuzzleException */ public function fileExists($url, $timeout = 0.50) { $fileExists = FALSE; try { $guzzleClient = new GuzzleHttp\Client(); $guzzleResponse = $guzzleClient->request('GET', $url, array( 'timeout' => $timeout, )); $fileExists = ($guzzleResponse->getStatusCode() == 200); } catch (Exception $e) { echo $e->getMessage(); } return $fileExists; } }