function checkRemoteFileExists($remoteFile) {
    $ch = curl_init($remoteFile);
    curl_setopt($ch, CURLOPT_NOBODY, true);
    curl_exec($ch);
    $code = curl_getinfo($ch, CURLINFO_HTTP_CODE);

    if ($code == 400) {
        $status = true;
    } else {
        $status = false;
    }
    curl_close($ch);
    return $status;
}