有人能指出我正確的方向嗎?我知道它與附加一個.ics文件有關,但我只能將它帶到用戶可以下載的位置,然後將事件導入到Outlook日曆中。我如何以編程方式創建這些會議要求?如何在PHP中創建Outlook日曆會議請求?
11
A
回答
5
您可以通過編程產生的.ics :)
方法如下:
<?php
$date = $_GET['date'];
$startTime = $_GET['startTime'];
$endTime = $_GET['endTime'];
$subject = $_GET['subject'];
$desc = $_GET['desc'];
$ical = "BEGIN:VCALENDAR
VERSION:2.0
PRODID:-//hacksw/handcal//NONSGML v1.0//EN
BEGIN:VEVENT
UID:" . md5(uniqid(mt_rand(), true)) . "example.com
DTSTAMP:" . gmdate('Ymd').'T'. gmdate('His') . "Z
DTSTART:".$date."T".$startTime."00Z
DTEND:".$date."T".$endTime."00Z
SUMMARY:".$subject."
DESCRIPTION:".$desc."
END:VEVENT
END:VCALENDAR";
//set correct content-type-header
header('Content-type: text/calendar; charset=utf-8');
header('Content-Disposition: inline; filename=calendar.ics');
echo $ical;
exit;
?>
18
這裏正在例如使用多個參與者:
<?php
$to = '[email protected],[email protected]';
$subject = "Millennium Falcon";
$organizer = 'Darth Vader';
$organizer_email = '[email protected]';
$participant_name_1 = 'Boushh';
$participant_email_1= '[email protected]';
$participant_name_2 = 'Boba Fett';
$participant_email_2= '[email protected]';
$location = "Stardestroyer-013";
$date = '20131026';
$startTime = '0800';
$endTime = '0900';
$subject = 'Millennium Falcon';
$desc = 'The purpose of the meeting is to discuss the capture of Millennium Falcon and its crew.';
$headers = 'Content-Type:text/calendar; Content-Disposition: inline; charset=utf-8;\r\n';
$headers .= "Content-Type: text/plain;charset=\"utf-8\"\r\n"; #EDIT: TYPO
$message = "BEGIN:VCALENDAR\r\n
VERSION:2.0\r\n
PRODID:-//Deathstar-mailer//theforce/NONSGML v1.0//EN\r\n
METHOD:REQUEST\r\n
BEGIN:VEVENT\r\n
UID:" . md5(uniqid(mt_rand(), true)) . "example.com\r\n
DTSTAMP:" . gmdate('Ymd').'T'. gmdate('His') . "Z\r\n
DTSTART:".$date."T".$startTime."00Z\r\n
DTEND:".$date."T".$endTime."00Z\r\n
SUMMARY:".$subject."\r\n
ORGANIZER;CN=".$organizer.":mailto:".$organizer_email."\r\n
LOCATION:".$location."\r\n
DESCRIPTION:".$desc."\r\n
ATTENDEE;CUTYPE=INDIVIDUAL;ROLE=REQ-PARTICIPANT;PARTSTAT=NEEDS-ACTION;RSVP=TRUE;CN".$participant_name_1.";X-NUM-GUESTS=0:MAILTO:".$participant_email_1."\r\n
ATTENDEE;CUTYPE=INDIVIDUAL;ROLE=REQ-PARTICIPANT;PARTSTAT=NEEDS-ACTION;RSVP=TRUE;CN".$participant_name_2.";X-NUM-GUESTS=0:MAILTO:".$participant_email_2."\r\n
END:VEVENT\r\n
END:VCALENDAR\r\n";
$headers .= $message;
mail($to, $subject, $message, $headers);
?>
這裏我發表的是如何將看起來像在Outlook和Gmail圖片: Examples
如果您需要添加/去除這裏的選項是VCALENDAR的參考: VCALENDAR on Wikipedia
相關問題
- 1. 是否可以使用nodeJS創建Outlook的會議請求?
- 2. Excel創建Outlook會議請求,無法發送
- 3. JAVA創建的ical會議在接受時不顯示在Outlook日曆中
- 4. 會議在PHP Ajax請求
- 5. 如何使用替代發件人/組織者創建Outlook會議請求?
- 6. Outlook日曆Rest API(使用更改管理器創建使用/ me/events請求的會議)
- 7. Outlook如何創建任務請求?
- 8. 在Azure中使用SendGrid創建Outlook日曆邀請(C#,.NET)
- 9. 使用蘋果腳本在Outlook 2011中創建會議邀請
- 10. 發送MS Outlook的會議請求
- 11. 在PHP中創建日曆
- 12. 如何創建並向Microsoft Outlook日曆發送約會?
- 13. 如何在Excel中使用VBA代表其他日曆發送會議請求?
- 14. 如何在PHP中創建HTTP請求?
- 15. 在沒有Outlook的情況下發送Outlook會議請求?
- 16. 如何在Outlook 2007中使用C#進行會議(在日曆中)?
- 17. 如何在Outlook中創建日曆組文件夾?
- 18. 如何在laravel中創建Outlook日曆事件?
- 19. 如何在java中創建outlook任務請求
- 20. 在MVC3中獲取Outlook會議請求更新
- 21. 使用POST請求在Google日曆中創建新事件
- 22. 無法創建Outlook日曆事件
- 23. Excel創建一個Outlook日曆事件
- 24. 在線會議日曆
- 25. 共享日曆中的自定義Outlook會議通知表格
- 26. PHP會議建議需要請
- 27. 在PHP中創建自定義日曆
- 28. 與outlook同步php日曆
- 29. 如何更新ICS日曆會議?
- 30. 從ASP.NET創建Outlook任務請求
榮譽保持主題與去你的用戶名和個人資料圖片 – ScottC