mcal_popen
Name
mcal_popen — Open a persistent MCAL stream to a
calendar
Synopsis
int mcal_popen
(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
A persistent MCAL stream on success, FALSE on error
Description
mcal_popen() is exactly the same as mcal_open() except that it
uses PHP's persistent resource management to keep the
calendar connection open between requests. This can
increase performances in some cases. You should always do
performance tests in your enviroment to find out what
works best for you, but in general, if you have a large
number of requests to a set of scripts which use a small
set of calendars, persistent connections will improve
performance. If your scripts are instead using a large
number of different calendars, then persistent
connections are more likely to be a waste and even to
hurt performance.
Version
PHP 3 since 3.0.13, PHP 4 since 4.0b4
Example
Example 729. Opening a
persistent MCAL connection
// Open a persistent connection to an mstore calendar.
$calendar = "{/mstore}";
$MCALconnection = mcal_popen($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.