O carregamento do api do Google Drive falha

Gostaria de fazer o upload de um arquivo de uma url para o Google Drive dividido, mas estou recebendo um erro. Testei com um arquivo local e funcionou. O que há de errado com isso?

Aqui está o meu código:

= $chunkSize) { return $giantChunk; } } return $giantChunk; } /** * Get Remote File Size * * @param string $url * * @return int */ function remoteFileSize($url) { # Get all header information $data = get_headers($url, true); # Look up validity if (isset($data['Content-Length'])) { return (int) $data['Content-Length']; } return 0; } /** * Get Remote File Size * * @param string $url * * @return string */ function remoteMimeType($url) { $ext = pathinfo($url, PATHINFO_EXTENSION); $mimeType = 'application/octetstream'; switch ($ext) { case 'zip' : $mimeType = 'application/zip'; break; case 'rar' : $mimeType = 'application/x-rar-compressed'; break; case '7z' : $mimeType = 'application/x-7z-compressed'; break; } return $mimeType; } /** * Upload a file to the google drive. */ try { $googleApi = new GoogleApi(); $client = $googleApi->getClient(); $service = new Google_Service_Drive($client); $getFile = new Google_Service_Drive_DriveFile(); $url = 'http://ipv4.download.thinkbroadband.com/1MB.zip'; $getFile->name = 'Test File.zip'; $chunkSizeBytes = 0.5 * 1024 * 1024; // Call the API with the media upload, defer so it doesn't immediately return. $client->setDefer(true); $request = $service->files->create($getFile); // Get file mime type $mimeType = remoteMimeType($url); // Create a media file upload to represent our upload process. $media = new Google_Http_MediaFileUpload( $client, $request, $mimeType, null, true, $chunkSizeBytes ); $media->setFileSize(remoteFileSize($url)); // Upload the various chunks. $status will be false until the process is // complete. $status = false; $handle = fopen($url, 'rb'); while (!$status && !feof($handle)) { // read until you get $chunkSizeBytes from TESTFILE // fread will never return more than 8192 bytes if the stream is read buffered and it does not represent a plain file // An example of a read buffered file is when reading from a URL $chunk = readFileChunk($handle, $chunkSizeBytes); $status = $media->nextChunk($chunk); } // The final value of $status will be the data from the API for the object that has been uploaded. $uploadedFileId = ''; if ($status !== false) { $uploadedFileId = $status['id']; print_r($uploadedFileId); } else { throw new Exception('Upload failed'); } fclose($handle); } catch (Exception $e) { print 'An error occurred: ' . $e->getMessage(); }