<?php
$maxdb = new maxdb("localhost", "MONA", "RED", "DEMODB");
/* check connection */
if (maxdb_connect_errno()) {
printf("Connect failed: %s\n", maxdb_connect_error());
exit();
}
/* print protocol version */
printf("Protocol version: %d\n", $maxdb->protocol_version);
/* close connection */
$maxdb->close();
?>