Skip to content

baptistereb/php2ics

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 

Repository files navigation

php2ics

php script to transform php into ics file

Deployment

1. copy the "php2ics.php" file in the main folder of your project

You can copy the file in a different folder

2. include the file in your code :
include("php2ics.php");

if you modify the folder then modify the adress in the "include".

3. use it !

How it work

1. Create a calendar :
$cal = new php2ics("your_organisation", "your_product");

"your_product" is not a required parameter

2. Add event (you can add as many as you want):
$cal->AddEvent("title", "description", "begin_time", "end_time", "location", "url");

"description", "location" and "url" are not required parameters

3. End file :
$cal->End();
4. Download it !
$cal->DownloadICS("my_ics");
You can also get it as HTML !
$cal->GetICS();

Documentation

AddEvent function :

Input parameter required parameter type description
title x string title of the event
description string description of the event
begin_date x int(timestamp) beginning datetime of the event
end_date x int(timestamp) ending datetime of the event
location string location of the event
url string url

NB: if parameter is not required, then you can replace it with this argument : NULL. Example :

$cal->AddEvent("title", NULL, 1660568400, 1660572000, NULL, NULL);

DownloadICS function :

Input parameter required parameter type description
fichier string name of downloaded file

NB: this parameter is not required, then you can replace it with this argument : NULL. By default, the name of the file will be : "calend" (calend.ics). Example :

$cal->DownloadICS("NULL");

About

php script to transform php into ics file

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages