aboutsummaryrefslogtreecommitdiff
path: root/php-client/api-config.dist.php
diff options
context:
space:
mode:
authorGravatar Miha Petkovsek <miha.petkovsek@gmail.com> 2016-06-22 10:51:47 +0200
committerGravatar Miha Petkovsek <miha.petkovsek@gmail.com> 2016-06-22 10:51:47 +0200
commit1503de4a313c30cacc912b9eb0a55c5422f8e849 (patch)
tree03c861abf887765e9b52976515881f2c0f306ce3 /php-client/api-config.dist.php
parentb05c2d3ec69e60a5f25cf309e30ff591c992228b (diff)
downloadphpipam-api-clients-1503de4a313c30cacc912b9eb0a55c5422f8e849.tar.gz
Working php API client with example
Diffstat (limited to 'php-client/api-config.dist.php')
-rw-r--r--php-client/api-config.dist.php23
1 files changed, 23 insertions, 0 deletions
diff --git a/php-client/api-config.dist.php b/php-client/api-config.dist.php
new file mode 100644
index 0000000..494ef87
--- /dev/null
+++ b/php-client/api-config.dist.php
@@ -0,0 +1,23 @@
+<?php
+
+# set error reporting
+error_reporting(E_ALL ^ E_NOTICE ^ E_STRICT);
+
+# api params
+$api_url = "http://127.0.0.1/api/"; // server url
+$api_app_id = "myapp"; // application id
+$api_key = false; // api key - only for encrypted methods, otherwise must be false
+
+# set username / password for authentication, not needed for encrypted communications
+$api_username = "apiusername";
+$api_password = "apipassword";
+
+# save token or not ?
+# false => dont save, check each time
+# filename => will save token to filename provided
+$token_file = "token.txt";
+
+# set result format json/object/array/xml
+$result_format = "json";
+
+?> \ No newline at end of file