summary refs log tree commit diff stats
path: root/php/ws-procedures.php
diff options
context:
space:
mode:
authorNaglfar <naglfar@tilde.institute>2021-01-08 01:48:41 +0100
committerNaglfar <naglfar@tilde.institute>2021-01-08 01:48:41 +0100
commit4eebbfb79c42abd8ebcd7d1776f164588a3d16b0 (patch)
treeb30d4d039b3618b948ce95873a6df266a888dd44 /php/ws-procedures.php
parent37ce89d17dbff71c107db5bc280e1721dbaae6ad (diff)
downloadMightyWVMS-4eebbfb79c42abd8ebcd7d1776f164588a3d16b0.tar.gz
Add data management php scripts
Diffstat (limited to 'php/ws-procedures.php')
-rw-r--r--php/ws-procedures.php10
1 files changed, 10 insertions, 0 deletions
diff --git a/php/ws-procedures.php b/php/ws-procedures.php
new file mode 100644
index 0000000..5dc685a
--- /dev/null
+++ b/php/ws-procedures.php
@@ -0,0 +1,10 @@
+<?php
+//read the file and create array separate by new line
+$mdata = file($dpath.'/'.$common, FILE_IGNORE_NEW_LINES);
+
+# Language overwritten by the browser preference
+if(isset($_SERVER['HTTP_ACCEPT_LANGUAGE']))
+  $mdata[3] = substr($_SERVER['HTTP_ACCEPT_LANGUAGE'], 0,2);
+
+$mdata = array_merge($mdata, file($dpath.$mdata[3].'/'.$common, FILE_IGNORE_NEW_LINES));
+?>