How can PHP be used to automate the process of downloading and saving files from a specific URL on a web server?

To automate the process of downloading and saving files from a specific URL using PHP, you can utilize the `file_get_contents()` function to retrieve the file contents and then use `file_put_contents()` to save the contents to a local file on the server.

$url = 'https://example.com/file-to-download.zip';
$localFilePath = 'downloaded-file.zip';

$fileContents = file_get_contents($url);

if ($fileContents !== false) {
    file_put_contents($localFilePath, $fileContents);
    echo "File downloaded and saved successfully.";
} else {
    echo "Failed to download file.";
}