How do I display images from Google Drive on a website?

前端 未结 17 1986
傲寒
傲寒 2020-12-02 05:35

A client of mine has uploaded some photos to their Google Drive and would like me to display their photos on their company website. I reviewed the documentation for displayi

17条回答
  •  北荒
    北荒 (楼主)
    2020-12-02 06:35

    I don't know of a better way but you can datamine the page with php. For instance if you go to google and share a folder then go to that folder it will look something like

    https://drive.google.com/folderview?id=0B8TT0olkjsdkfji9jekbFF4LWc&usp=sharing

    ^^^ not a real link

    What you are looking for is the individual images inside the source code of this page

    then using php get the source code with

    
    

    now $f has the source and you can use other php commands to seperate only the URLS with the images you want. It will take a bit of work but highly doable.

    once you have these image links showing the way you want just build them into a div or table structure to display on a gallery maybe even add a greybox element for effect

提交回复
热议问题