I have the URL of the file, to get details of the file, file_id is required? Is there any way to retrieve file_id from the URL.I'm looking for something like
$driveService->files->getFileIdFromUrl($url)
I have the URL of the file, to get details of the file, file_id is required? Is there any way to retrieve file_id from the URL.I'm looking for something like
$driveService->files->getFileIdFromUrl($url)
Apparently Google doesn't provide an explicit interface, so using a regex to extract the id string is probably your best bet.
See Easiest way to get file ID from URL on Google Apps Script for how to do this javascript.
Regexes are available in php. You can test your php regexes at http://www.phpliveregex.com/