Reputation: 1
I just need a starting place. How would you grab files from Google Drive with PHP? So, you would result in this:
<audio src='Google Drive File'></audio>
I'm just starting programming. Any help would be appreciated...
Upvotes: 0
Views: 320
Reputation: 15962
Are you manually sharing just a few specific files or do you want to fetch the file's link dynamically/using lookups, etc.?
For the first, you can use the Google Drive Direct Link Generator.
The other option is to modify the URL yourself so that something with a shared link like https://drive.google.com/file/d/FILE_ID/edit?usp=sharing
becomes https://drive.google.com/uc?export=download&id=FILE_ID
.
If purely non-manual and only in PHP, use the Drive SDK for PHP (beta) or via the REST API, has PHP examples.
Upvotes: 1