File "vcal04.php"

Full Path: /home/analogde/www/JAVA/vcal/vcal04.php
File size: 1.37 KB
MIME-type: text/x-php
Charset: utf-8

<?php
//https://www.phpclasses.org/browse/file/63438.html

//https://packagist.org/packages/eluceo/ical

// https://tools.ietf.org/html/rfc5545

// https://www.kanzaki.com/docs/ical/

// https://en.wikipedia.org/wiki/ICalendar

//adding ical attachement to mail

//https://stackoverflow.com/questions/32626033/php-adding-ical-attachement-to-mail

	define('CRLF',"\r\n");

	$start_time = 1584698400; // Friday, 20-Mar-2020 10:00:00 GMT+0000
	$end_time = 1584716400;	// Friday, 20-Mar-2020 15:00:00 GMT+0000
	
	$dtstamp = date('Ymd')."T".date('His');
	$uid = md5(uniqid(mt_rand(), true))
	$prodid = "PRODID:-//Massage iCal API//EN\r\n"
	
	//METHOD:PUBLISH\r\n
	
	echo " Start : " .date('Ymd',$start_time)."T".date('His',$start_time).CRLF;
	echo " End : " .date('Ymd',$end_time)."T".date('His',$end_time).CRLF;
	
	
	$from='some@mail.address';
	$to='patrice.delpy@onsemi.com';
	$subject='Subject';
	$message='Hello World!';

/*
	 $eol = "\r\n";
	 
	 
	 $load = "BEGIN:VCALENDAR" . $eol .
	 "VERSION:2.0" . $eol .


		$content = "BEGIN:VCALENDAR\n".
            "VERSION:2.0\n".
            "PRODID:-//hacksw/handcal//NONSGML v1.0//EN\n".
            "BEGIN:VEVENT\n".
            "UID:".uniqid()."\n".
            "DTSTAMP:".$time."\n".
            "DTSTART:".$time."\n".
            "DTEND:".$time."\n".
            "SUMMARY:".$summary."\n".
            "END:VEVENT\n".
            "END:VCALENDAR";

*/
?>