PhpDig.net

What is PhpDig?
PhpDig is a PHP MySQL based
Web Spider & Search Engine.




mcal_open

Name

mcal_open — Open an MCAL stream to a calendar

Synopsis

int mcal_open(calendar, user, password[, options]);
string calendar: The calendar address
string user: The username to log in as
string password: The password to log in with
int options (optional): A bitmask of flags for future expansion

Returns

An MCAL stream on success, FALSE on error

Description

mcal_open() lets you open a stream, or connection, to any backend that libmcal supports. You determine what kind of backend you are connecting to with the calendar specification string. There are currently mstore (local files) and ICAP (Internet Calendar Access Protocol) backends.

The mstore backend is well tested, and all core MCAL features work with it, except as noted in functions like mcal_create_calendar() . However, it does have the drawback of relying on files on a single machine, making it hard to scale to extreme levels.

The ICAP backend promises access to remote servers, and thus scalability, easier shared calendars, and interoperability with commercial calendaring products. However, it is not nearly as well tested, some functionality may be missing from libmcal's ICAP backend, and there are very few other products available that support ICAP. The libmcal project does have a fledgling ICAP server available in CVS, however, at http://sourceforge.net/projects/libmcal/.

Calendar addresses are of the form {servername/protocol}<calendar>. Valid protocols are "icap" and "mstore". You don't need a servername for the mstore driver, since it just uses local files. The calendar argument is optional, and is only needed if you want to specify a calendar other than the default for the current user.

Version

PHP 3 since 3.0.13, PHP 4 since 4.0b4

Example

Example 728. Opening MCAL connections

// Open a connection to an mstore calendar,
// using the default calendar for "username".
$calendar = "{/mstore}";
$MCALconnection = mcal_open($calendar, "username", "password");

// Open a connection to an mstore calendar, opening a different calendar:
// "birthdays". "username" must have permission to at least
// read from this calendar.
$calendar = "{/mstore}<birthdays>";
$MCALconnection = mcal_open($calendar, "username", "password");

// Open a connection to an ICAP calendar on the machine icap.example.com,
// using the default calendar for "username".
$calendar = "{icap.example.com/icap}";
$MCALconnection = mcal_open($calendar, "username", "password");



PHP Functions Essential Reference. Copyright © 2002 by New Riders Publishing (Authors: Zak Greant, Graeme Merrall, Torben Wilson, Brett Michlitsch). This material may be distributed only subject to the terms and conditions set forth in the Open Publication License, v1.0 or later (the latest version is presently available at http://www.opencontent.org/openpub/). The authors of this book have elected not to choose any options under the OPL. This online book was obtained from http://www.fooassociates.com/phpfer/ and is designed to provide information about the PHP programming language, focusing on PHP version 4.0.4 for the most part. The information is provided on an as-is basis, and no warranty or fitness is implied. All persons and entities shall have neither liability nor responsibility to any person or entity with respect to any loss or damage arising from the information contained in this book.

Powered by: vBulletin Version 3.0.7
Copyright ©2000 - 2005, Jelsoft Enterprises Ltd.
Copyright © 2001 - 2005, ThinkDing LLC. All Rights Reserved.