Hi I want to post "events" to my DAViCal using .ICS file and PHP/CURL.
Below is my code and seems like something wrong with it.
Or is there any other way to push events using .ICS to DAViCal?
Thanks.
$url = "http://my.davical.location/caldav.php/myusername/home/";
$ch = curl_init();
$localfile = "/my/ics/file/location/test.ics";
$fp = fopen ($localfile, "r");
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_USERPWD, 'myname:mypwd');
curl_setopt($ch, CURLOPT_HTTPHEADER, $header_array);
curl_setopt($ch, CURLOPT_PUT, 1);
curl_setopt($ch, CURLOPT_UPLOAD, 1);
curl_setopt($ch, CURLOPT_REFERER, 1);
curl_setopt($ch, CURLOPT_INFILE, $fp);
curl_setopt($ch, CURLOPT_INFILESIZE, filesize($localfile));
curl_exec($ch);
--
View this message in context: http://davical-general.89287.n3.nabble.com/PHP-CURL-tp955334p955334.html
Sent from the DAViCal general mailing list archive at Nabble.com.
Below is my code and seems like something wrong with it.
Or is there any other way to push events using .ICS to DAViCal?
Thanks.
$url = "http://my.davical.location/caldav.php/myusername/home/";
$ch = curl_init();
$localfile = "/my/ics/file/location/test.ics";
$fp = fopen ($localfile, "r");
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_USERPWD, 'myname:mypwd');
curl_setopt($ch, CURLOPT_HTTPHEADER, $header_array);
curl_setopt($ch, CURLOPT_PUT, 1);
curl_setopt($ch, CURLOPT_UPLOAD, 1);
curl_setopt($ch, CURLOPT_REFERER, 1);
curl_setopt($ch, CURLOPT_INFILE, $fp);
curl_setopt($ch, CURLOPT_INFILESIZE, filesize($localfile));
curl_exec($ch);
--
View this message in context: http://davical-general.89287.n3.nabble.com/PHP-CURL-tp955334p955334.html
Sent from the DAViCal general mailing list archive at Nabble.com.