Search
 
SCRIPT & CODE EXAMPLE
 

PHP

php ical

$ical = "BEGIN:VCALENDAR
VERSION:2.0
PRODID:-//hacksw/handcal//NONSGML v1.0//EN
BEGIN:VEVENT
UID:" . md5(uniqid(mt_rand(), true)) . "@yourhost.test
DTSTAMP:" . gmdate('Ymd').'T'. gmdate('His') . "Z
DTSTART:19970714T170000Z
DTEND:19970715T035959Z
SUMMARY:Bastille Day Party
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;
Comment

PREVIOUS NEXT
Code Example
Php :: random element in faker 
Php :: replace all occurrence char in string php 
Php :: laravel validation in controller 
Php :: check if given date time is of today or yesterday php 
Php :: laravel route multiple methods 
Php :: wp_get_attachment_url 
Php :: grouping route in laravel 
Php :: In PackageManifest.php line 122: Undefined index: name 
Php :: concatener 2 variables php 
Php :: laravel migration table bigint 
Php :: php how to connect to db using PDO 
Php :: ?? ternary operator in php 
Php :: for else laravel 
Php :: set php var to html 
Php :: laravel where 
Php :: ci base url dynamic 
Php :: php array subset by slicing 
Php :: laravel where equal 
Php :: php function crop image 
Php :: laravel unique validation on multiple columns 
Php :: php ip log 
Php :: php loop html select option 
Php :: wordpress get category description 
Php :: include in php 
Php :: get value from url in laravel blade 
Php :: laravel carbon time format 
Php :: get last element of array php 
Php :: php add variable to array 
Php :: php named parameters 
Php :: phpmailer addattachment 
ADD CONTENT
Topic
Content
Source link
Name
5+8 =