here a few hints, they may help. in the shell to access google calendar through curl: curl -k --request PROPFIND --header "Content-Type: text/xml" --header "Depth: 0" --data-ascii "<D:propfind xmlns:D=\"DAV:\"><D:prop><CS:getctag xmlns:CS=\"http://calendarserver.org/ns/\"></CS:getctag></D:prop></ D:propfind>" --user "[email protected]:xxxxpasswordxxx" "https://www.google.com/calendar/dav/[email protected]/events/"
look at davical, in some folder there is a client.php. I tested it against google calendar and it works. but there was one problem look at the SSL instead of HTTPS: $acc["google"] = array( "user"=>"[email protected]", "pass"=>"xxxx", "server"=>"ssl://www.google.com", "port"=>"443", "uri"=>"https://www.google.com/calendar/dav/[email protected]/events/", ); $acc["davical"] = array( "user"=>"yyyy", "pass"=>"xxxx", "server"=>"calendar.farbraum.biz", "port"=>"80", "uri"=>"http://calendar.farbraum.biz/caldav.php/yyyy/home/", ); i moved in PHP from curl to fsockopen() it is much easier to communicate with caldav. i hope it help, as i'm swimming to in some other things, like fetching a list of all calendars... Regards Andres Switzerland On 6 Mrz., 16:27, "[email protected]" <[email protected]> wrote: > Hi > > I'm successfully retrieving google calendar data using php and curl, > but when i test it on our live server, it's not working. We're > blocking outgoing connections on port 80. Can i connect using 443 or > another port? > > Tried the following, but no joy: > > curl_setopt ($ch, CURLOPT_URL, $urlstring); > curl_setopt ($ch, CURLOPT_PORT, 443); > curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1); > curl_setopt ($ch, CURLOPT_CONNECTTIMEOUT, $timeout); > //Below two option will enable the HTTPS option. > curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE); > curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 2); > $file_contents = curl_exec($ch); > curl_close($ch); > $xml = $file_contents; > > Any help would be greatly appreciated > > Ross --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Google Calendar Data API" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/google-calendar-help-dataapi?hl=en -~----------~----~----~----~------~----~------~--~---
