this-> GetConfigToArray

(Caronte Pcode version 2.0)

Description

int this-> GetConfigToArray (class HashArray arr, string key);

Get alle the values in the section key from the config file and put them in the HashArray arr.

Example.

Source:

Config file:

[DNS]
nameserver_3=
nameserver_2=151.99.125.3
nameserver_1=151.99.125.2

#import( class , HashArray )

CS_ADMIN_SCRIPT this = new CS_ADMIN_SCRIPT($_this);

int Main(CAdminRequest pRequest, CAdminResponse pResponse)
{
HashArray test = new HashArray();

this->GetConfigToArray(test,"DNS");
this->Print(test->GetS("nameserver_1"));

delete test;
return 0;

}



Out:
151.99.125.2