在谷歌文档中使用 PHP 创建文件夹
目前我正在开发一个使用 php 将 google 文档集成到我的应用程序的项目。但是,php 只有 version1,而且我不太熟悉 REST Web 服务。我需要使用 api 创建文件夹。我想知道有人管理/知道如何做到这一点吗?以下是创建文件夹的协议。如果有人知道该怎么做,我将很高兴您能帮助我。先感谢您。
POST /feeds/default/private/full HTTP/1.1
Host: docs.google.com
GData-Version: 3.0
Authorization: <your authorization header here>
Content-Length: 245
Content-Type: application/atom+xml
<?xml version='1.0' encoding='UTF-8'?>
<entry xmlns="http://www.w3.org/2005/Atom">
<category scheme="http://schemas.google.com/g/2005#kind"
term="http://schemas.google.com/docs/2007#folder"/>
<title>Example Folder</title>
</entry>
Currently I am working on a project integrating google docs to my application using php. However, there is only version1 for the php and I am not well-versed with REST web service. And I am required to create folder using the api. I wonder any people manage/know how to do it? Below is the protocol for the creation of the folder. If anyone know how to do it, I would be glad if you can assist me. Thank you in advance.
POST /feeds/default/private/full HTTP/1.1
Host: docs.google.com
GData-Version: 3.0
Authorization: <your authorization header here>
Content-Length: 245
Content-Type: application/atom+xml
<?xml version='1.0' encoding='UTF-8'?>
<entry xmlns="http://www.w3.org/2005/Atom">
<category scheme="http://schemas.google.com/g/2005#kind"
term="http://schemas.google.com/docs/2007#folder"/>
<title>Example Folder</title>
</entry>
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
看看这篇文章: http://www.lornajane.net/posts/2008/Using-curl-and-PHP-to-talk-to-a-REST-service
如果您在此之后需要更多信息,请查看PHP 手册中
Take a look at this article: http://www.lornajane.net/posts/2008/Using-curl-and-PHP-to-talk-to-a-REST-service
If you need more information after this take a look at the functions in the PHP manual for CURL.