- Author: Majksa
- Version: 1.0.0
- PHP version: 5.6+
- Go to https://console.developers.google.com/
- Create new project
- Create O2Auth credentials with redirect uri and download them
- Load using
include '/path/to/GoogleDriveApi/GoogleDriveApi.php';
- When creating
new GoogleDriveApi()
send path to credentials as the parameter.
- log out
logOut()
- get email
getEmail()
- list files
listFiles($fields = "files(id, name, owners)")
- create folder
createFolder($name, $parentId = "root")
- upload file
uploadFile($fullName, $mimeType, $fullPath, $parentId = "root")
- upload file basic
uploadFileBasic($name, $type, $extension, $pathToFileDir, $parentId = "root")
- create file
createFile($fullName, $mimeType, $parentId = "root")
- create file basic
createFileBasic($name, $type, $extension, $parentId = "root")
- move file
moveFile($fileId, $folderId)
- download file
downloadFile($fileId)
- test files owners
testFilesOwners()
- set verified owners
setVerifiedOwner($ids)
About
Operates with Google Drive. For ex. upload, download, create, move, list files and folders.
http://www.majksa.cz
Languages
Language:PHP 100.0%