@@ -33,7 +33,7 @@ Then: `require_once "/path/to/vendor/autoload.php";` & `use Technitium\DNSServer
3333require_once "/vendor/autoload.php";
3434use Technitium\DNSServer\API;
3535
36- $api = new API();
36+ $api = new API("path/to/env", "env-name" );
3737
3838// Get all zones
3939$zones = $api->zones()->get();
@@ -64,7 +64,7 @@ if($api->apps->downloadAndInstall($sampleApp["name"], $sampleApp["url"])) {
6464require_once "/vendor/autoload.php";
6565use Technitium\DNSServer\API;
6666
67- $api = new API();
67+ $api = new API("path/to/env", "env-name" );
6868// You have to set <bool >$bypass to true to use this feature
6969echo var_dump($api->sendCall(data: array("field" => "value"), endpoint: "admin/users/list", skip: false, bypass: true))
7070
@@ -87,7 +87,7 @@ $ddns->updateRecords($path_to_configJSON);
8787
8888// OR
8989
90- $ddns_result = new DDNS(new API(), file_get_contents($path_to_configJSON)); // starts automatically updating the records
90+ $ddns_result = new DDNS(new API("path/to/env" ), file_get_contents($path_to_configJSON)); // starts automatically updating the records
9191
9292// OR
9393$api = new API();
@@ -115,14 +115,19 @@ require_once "/vendor/autoload.php";
115115use Technitium\DNSServer\API;
116116use Technitium\DNSServer\API\Helper\DDNS;
117117
118- DDNS(new API(), file_get_contents("/my/config.json"));
118+ DDNS(new API("path/to/env" ), file_get_contents("/my/config.json"));
119119DDNS(new API(__DIR__), file_get_contents("/my/config2.json"));
120120DDNS(new API(__DIR__ . "/configurations", ".env-custom"), file_get_contents("/my/config3.json"));
121121
122122```
123123
124124## Changes
125125
126+ ### v1.1.3: Shell safe
127+
128+ - Library is now shell safe (you are now required to specify the path to the ` .env ` file)
129+ - Silenced most $_ SERVER[ 'argv'] warnings when running the library in shell
130+
126131### v1.1.2: Quality
127132
128133- Added more documentation to the classes
0 commit comments