Switch to: V11V10V9V8V7V6V5

valentina_connect()

Declaration

resource valentina_connect ( 
            [string server], 
            [string username], 
            [string password], 
            [string encoding], 
            [string options],
            [bool   useSSL] )

Parameters for Client

Name Description Default Value
server The Valentina server. It can also include a port number. e.g. “hostname:port”. 'localhost'
username The username. An empty name.
password The password. An empty password.
encoding The encoding. “UTF-8”
options A string for additional options. An empty string.
useSSL A boolean value which is enable or disable SSL connection. false.

Parameters for Standalone

If VPHP sees that the first parameter is number but not string, it start consider this as the call in the LOCAL mode for VPHP Standalone build.

Name Description Default Value
inCacheSize The cache size 8 MB
inSerial The serial that you get after purchase empty string

Description

Opens a connection to a Valentina server in the CLIENT mode OR init Valentina engine in the LOCAL mode.

Return Values

Returns a Valentina Connection link identifier on success, or FALSE on failure.

Examples

Example

<?php
$link = valentina_connect('localhost', 'val_user', 'val_password');
if (!$link) {
   die('Could not connect: ' . valentina_error());
}
echo 'Connected successfully';
 
valentina_close($link);
?>

Example

<?php
$link = valentina_connect( '15728640', '' );
if (!$link) {
   die('Could not connect: ' . valentina_error());
}
echo 'Connected successfully';
 
valentina_close($link);
?>

See Also