How google drive file save in server directory using php?

Discussion in 'PHP' started by i_am_dhaval, Nov 3, 2014.

  1. #1
    i_am_dhaval, Nov 3, 2014 IP
  2. Anveto

    Anveto Well-Known Member

    Messages:
    697
    Likes Received:
    40
    Best Answers:
    19
    Trophy Points:
    195
    #2
    You should be able to do this if you only have the link

    <?php
    $filename ='https://doc-0g-as-docs.googleusercontent.com/docs/securesc/ha0ro937gcuc7l7deffksulhg5h7mbp1/4bfrd0iicbaslkeqkla5fjac37lbd4rk/1415080800000/13724799821103842601/*/0BwXwyDkfTOQ1MGc1ZXV1WWFaaGc?e=download';
    file_put_contents('/your/server/path/folder/'. basename($filename),// where to save file
    file_get_contents($filename));
    
    PHP:
    source: http://stackoverflow.com/questions/...from-a-dynamic-link-and-store-to-local-folder
     
    Anveto, Nov 4, 2014 IP