SUMMARY: Imię i Nazwisko
DESCRIPTION: uwagi\nTel: xxx-xxx-xxx
<?php $i = 0; if ($fp){ # $line = mb_convert_encoding($line, 'auto', 'auto'); if($i == 0){ // header of csv file $header = $line; }else{ $data[] = $line; } $i++; } } } #unlink($filepath); // designate file path $file_name = "calendar.ics"; // open file // number of data $i = $i - 2; //X-WR-TIMEZONE:Europe/Warsaw // write header part $common = "BEGIN:VCALENDAR" . "\n"; $common = "VERSION:2.0" . "\n"; $common = "PRODID:-//Google Inc//Google Calendar 70.9054//EN" . "\n"; $common = "CALSCALE:GREGORIAN" . "\n"; $common = "METHOD: PUBLISH" . "\n"; $common = "X-WR-CALNAME:Pacjenci PŁ" . "\n"; $common = "X-WR-TIMEZONE:Europe/Warsaw" . "\n"; // write data for($count = 0; $count < $i; $count++){ $common = "BEGIN:VEVENT" . "\n"; $item = $header_item[$j] . ":" . $data_item[$j] . "\n"; } $common = "END:VEVENT" . "\n"; } // write footer part $common = "END:VCALENDAR" . "\n"; // download ics file $fname = "calendar.ics"; #header('Content-Type: application/force-download'); # header('Content-Length: ' . filesize($file_name)); #header('Content-disposition: attachment; filename="' . $fname . '"'); // delete file #unlink($file_name); ?>