this-> GetConfig

(Caronte Pcode version 2.0)

Description

string this-> GetConfig (string var, string key);

Get the value that corresponds to the var label in the section key from the config file.

Example.

Source:

Config file:

[DNS]
nameserver_3=
nameserver_2=151.99.125.3
nameserver_1=151.99.125.2

CS_ADMIN_SCRIPT this = new CS_ADMIN_SCRIPT($_this);

int Main(CAdminRequest pRequest, CAdminResponse pResponse)
{
this->Print(this->GetConfig("nameserver_1","DNS"));

return 0;

}



Out:
151.99.125.2