Skip to content

A live bird collage card for your Home Assistant dashboard.

readding write_config.php for testing

mcguirepr89b7f03704ddfc
diff --git a/scripts/write_config.php b/scripts/write_config.php
new file mode 100644
index 00000000..beb7bd35
--- /dev/null
+++ b/scripts/write_config.php
@@ -0,0 +1,14 @@
+<?php
+if(isset($_POST['field1']) && isset($_POST['field2'])) {
+ $data = $_POST['field1'] . '-' . $_POST['field2'] . "\r\n";
+ $ret = file_put_contents('/tmp/mydata.txt', $data, FILE_APPEND | LOCK_EX);
+ if($ret === false) {
+ die('There was an error writing this file');
+ }
+ else {
+ echo "$ret bytes written to file";
+ }
+}
+else {
+ die('no post data to process');
+}