将 Outlook 日历集成到网站/其他
当用户将事件添加到在线日历时,它们也可以添加到 Outlook 日历(同步)。显然,使用 PHP 构建的网站无法直接与桌面应用程序集成,因此我正在寻找替代选项。
我发现的选项:
- 使用 PHP ICAL 库创建一个 .ics 文件,用户可以下载并安装它。这不是最用户友好的方式,可能会起作用。
- 使用 SharePoint 或交换服务器 - 但以前没有使用 Microsoft 技术的经验,因此它并不理想。
- 使用 Google Calendar 和 Zend Library (gdata),创建在线日历并向其中添加事件。然后使用 Google Calendar Sync 工具,用户可以将在线日历同步到 Outlook。但这里的问题是所有用户都需要一个 Gmail 帐户才能使用同步工具,当网站上有数千名用户时,这并不理想。除非我创建一个全球 Gmail 帐户并在该帐户上创建许多日历(如果可能的话)。
问题:
- 是否有任何付费或免费(理想情况下)的 Outlook 插件可以实现此目的?
- 是否有任何 Web 服务/ API 可以实现此目的?
- 还有其他想法或解决方案吗?
When the users add events to the online calendar they also can be added to the outlook calendar (synchronize). Obviously a site built using PHP can not integrate with desktop application directly, so I am looking alternative options.
Options I found:
- Using PHP ICAL library creates an .ics file and the user can download it and install. Not the most user friendly way of doing it, might work.
- Use SharePoint or exchange server- but have no previous experience working Microsoft technologies, so it not ideal.
- Use Google Calendar and Zend Library (gdata), create online calendar and add events to that. Then using Google Calendar Sync tool the user can sync the online calendar to outlook. But the problem here is the all users need a gmail account to use the Sync tool, it not ideal when you have thousands of users on the site. Unless I create one global gmail account and create many calendars on that account, if that even possible.
Questions:
- Are there any outlook plug-ins paid or free (ideally) that can achieve this?
- Are there any web service/ APIs that can achieve this?
- Any other ideas or solutions?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(5)
Office 365 附带一个 REST API,可用于读取/写入日历。
这是一些关于此的文档。 http://msdn.microsoft.com/office/office365/api/calendar -rest-operations
另外,EWS 托管 API 或许可以帮助您:http://msdn.microsoft.com/en- us/library/office/dd633696(v=exchg.80).aspx 和
http://msdn.microsoft.com/ en-us/library/office/dd633702(v=exchg.80).aspx
Office 365 comes with an REST API that can be used to read/write to calendars.
Here's some documentation on this. http://msdn.microsoft.com/office/office365/api/calendar-rest-operations
Alternatively, the EWS Managed API might be able to help you: http://msdn.microsoft.com/en-us/library/office/dd633696(v=exchg.80).aspx and
http://msdn.microsoft.com/en-us/library/office/dd633702(v=exchg.80).aspx
您可以通过让 Outlook 订阅在线日历来做到这一点。
使用 phpicalendar,您可以让其他客户端订阅您的日历(此处 )
您可能需要调整生成的 .ics 文件以包含 X-PUBLISHED-TTL - 订阅日历的推荐更新间隔
you could do this by having the outlook subscribe to the online calendar.
with phpicalendar you can have other clients subscribe to your calendars (here)
you may want to tweak the generated .ics file to include X-PUBLISHED-TTL - Recommended update interval for subscription to the calendar
要获取日历事件,请按照以下步骤操作:
注意:如果已执行步骤 5,只需跳过它并单击“链接到事件详细信息”
To get the calender event follow these step:
Note: If step number 5 is already performed, just skip it and click Link to event details
使用 EWS 交换 Web 服务来实现此目的。
如果是一个没有编号的网站。您需要在 Exchange 服务器中创建 OU 的用户,并添加一个对 DL 中的所有帐户具有读取权限的管理员用户。
EWS 公开端点,您可以在其中获取日历邮件、添加阅读并执行各种操作。
Use EWS exchange webservice to achieve this.
If it is a website with a no. of users u will need to create OU in exchange server and add a admin user who has read permissions to all accounts in the DL.
EWS exposes endpoints where in u can fetch the calendar mail add read and do all kind of operations.
基于 Rahul 的想法,但使用不同的方法 - Microsoft 提供了类似于“RSS feed”的东西,每次获取 URL 时都会自动更新,但它是“ICS”事件数据的 feed:
打开 Outlook Web Access ( OWA),例如,如果您使用 microsoft.com 帐户,则 URL 可能为 https://outlook.live.com/calendar/(如果您使用其他 Microsoft 365 帐户,则 URL 可能会有所不同)
单击右上角的“设置”图标
单击“查看所有 Outlook 设置”
单击“日历”>共享日历>在“发布日历”下,选择日历,然后在“选择权限”下,选择适当的内容,然后单击“发布”
它将为您提供 HTML 和 ICS 链接。复制 ICS 链接 URL。
使用您最喜欢的编程语言/工具/软件定期对您在步骤 5 中获得的 URL 执行 HTTPS 请求(使用 CURL 或 AJAX 或其他 HTTP 获取)。您将获得一堆日历数据ICS 格式。根据需要使用它。您也许可以从其他地方找到一些预先编写的代码来为您解析 ICS 数据,或者如果需要,您也可以手动创建自己的解析器代码。
Building off Rahul's idea but using a different approach - Microsoft provides something similar to a "RSS feed" that auto updates each time you GET the URL, except it's an feed of "ICS" event data:
Open up Outlook Web Access (OWA), e.g. if you are using a microsoft.com account the URL might be https://outlook.live.com/calendar/ (if you are using some other Microsoft 365 account the URL may be different)
On the top right, click the Settings icon
Click View all Outlook Settings
Click Calendar > Shared Calendars > and under Publish a calendar, select the calendar, then under Select permissions, choose as appropriate, then click Publish
It will give you HTML and ICS links. Copy the ICS link URL.
Use your favourite programming language/tool/software to periodically do a HTTPS request (using CURL or AJAX or some other HTTP fetch) using GET method to the URL you got in step 5. You will get back a bunch of calendar data in ICS format. Use this however you need. You may be able to find some pre-written code from elsewhere that parses ICS data for you, or you can manually create your own parser code if you have to.