PreviousNext
Help > API Functions > Connection > i5_get_property
i5_get_property

 

Get an Easycom server property value.

 

 

 int / string i5_get_property (int Property, resource connection)

 

 

Parameters

property

 

 

 

Symbolic value of the property to get value of.

Property

Description

I5_NEW_CONNECTION

This property has sense only when connection was open by i5_pconnect(),

Return values are:

        0 : The connection was already open by a previous call to i5_pconnect() in a previous script.

        1 : This is a new connection never used before by another PHP script.

 

I5_PRIVATE_CONNECTION

This property has sense only when connection was open by i5_pconnect(),

Return value is the connection ID you have to store in a session variable, and set to option I5_OPTIONS_PRIVATE_CONNECTION on a next i5_pconnect() call.

 

connection

Connection resource - result from i5_connect() or i5_pconnect()

 

 

Return

Property value. Returns False if error.

Error returned

I5_ERR_PARSEXML

42

Internal error; please contact Aura Equipements.

error number 42

I5_ERR_PHP_OPTIONSTYPE

259

The type of " I5_OPTIONS_ALIAS" option must be x

and not x

I5_ERR_PHP_OPTIONSNUMBER

260

Option number -1 is unknown.

I5_ERR_PHP_TYPEPARAM

262

Type of element x in parameter -1 must be y.

Type z was provided.

I5_ERR_PHP_DESC_EMPTY

310

The description array is empty.

 

 

 

Example

 

 

$conn = i5_pconnect("193.104.118.120", "QPGMR", "PASSWORD");

if (!$conn)

 {

                   $error = i5_error();

                   echo " Error during connection<BR>";

echo "<BR> Error number: ".$error["num"];

                   echo "<BR> Error category: ".$error["cat"];

                   echo "<BR> Error message: ".$error["msg"];

                   echo "<BR> Error description: ".$error["desc"];

                   trigger_error("I5 connection fails", E_USER_ERROR);

}

else

{

                   echo " Connection OK <BR>";

 

$isnew = i5_get_property(I5_NEW_CONNECTION, $conn);

                   if ($isnew == 1)

{

                                   echo('New connection.<BR>');

 }

else

{

                echo('The connection was already open by a previous call to                                           i5_pconnect() <BR>'); }

}

 

 

See also

 

i5_pconnect