The contents of your $local_file is a directory, not a file. You need to specify the full path to a file, preferably one that doesn't yet exist. You can't just tell the script which directory to put the file in, but if you want to keep the same file name as the remote server you can do
// URL of the file you want to get from the internet
$remote_file = "http://my.server/path/to/my/image.jpg";
// Path to the file you want to create on your machine
$local_file = "C:/Documents & Settings/MyUser/Desktop/A Folder/".basename($remote_file);