backup a google doc spreadsheet with php & zend

2019-07-23 22:31发布

Hi Trying to use php to backup a google doc spreadsheet into another (without writing row by row) or to download it like an excel document Can someone help me?

2条回答
ら.Afraid
3楼-- · 2019-07-23 23:07

You'll likely find the answers in the Google Docs API.

The entry for copying Google Documents shows this sample:

send an HTTP POST to the main feed. In the <entry>, set the <id> to the self link of the source entry (the document to be copied).

Use PHP to send an HTTP POST request when you have that ID data.

POST /feeds/default/private/full/ HTTP/1.1
Host: docs.google.com
GData-Version: 3.0
Authorization: <your authorization header here>
Content-Length: 292
Content-Type: application/atom+xml

<?xml version='1.0' encoding='UTF-8'?>
<entry xmlns="http://www.w3.org/2005/Atom">
  <id>https://docs.google.com/feeds/default/private/full/document%3Adoc_id</id>
  <title>My Twin</title>
</entry>
查看更多
登录 后发表回答