diff --git a/.htaccess b/.htaccess
new file mode 100644
index 0000000..12ed129
--- /dev/null
+++ b/.htaccess
@@ -0,0 +1,4 @@
+
+ deny from all
+
+
diff --git a/expunge.sh b/expunge.sh
new file mode 100644
index 0000000..c1efc35
--- /dev/null
+++ b/expunge.sh
@@ -0,0 +1,18 @@
+#!/bin/bash
+
+uploaddir='/var/www/html/files';
+timeout=30
+
+list=`ls ${uploaddir}`
+
+for file in ${list}
+do
+ prefix=`echo ${file} | awk -F '-' '{ print $1}'`
+ stamp=`date +%s`
+ delta=`expr ${stamp} - ${prefix}`
+
+ if [[ "$delta" -gt "$timeout" ]]
+ then
+ rm -f "${uploaddir}/${file}"
+ fi
+done
diff --git a/index.php b/index.php
new file mode 100644
index 0000000..585b266
--- /dev/null
+++ b/index.php
@@ -0,0 +1,52 @@
+"ERR","message"=>"Empty type"]); exit;}
+if (array_search($type, $allowed_types) === false) {print json_encode(["status"=>"ERR","message"=>"Invalid type"]); exit;}
+if (preg_match("/\.([^\.]*)$/", $_FILES['userfile']['name'], $r)) {
+ $name_tmp=preg_replace("![\.]!","-",time().".".uniqid(null,true));
+ if (array_search(strtolower($r[1]), $allowed_ext) === false) {print json_encode(["status"=>"ERR","message"=>"Invalid src ext"]); exit;}
+ $src=$uploaddir."/".$name_tmp.".".$r[1];
+ $dst=$uploaddir."/".$name_tmp.".".$type;
+ move_uploaded_file($_FILES['userfile']['tmp_name'], $src);
+ exec("/usr/bin/unoconv -n -f ".$type." -o '".$dst."' '".$src."'",$res,$code);
+ if ($code ==0) {
+ exec("rm -f ".$src);
+ } else {
+ exec("rm -f $src");
+ exec("rm -f $dst");
+ print json_encode(["status"=>"ERR","message"=>"Converter error. Code $code"]);
+ exit;
+ }
+} else {
+ print json_encode(["status"=>"ERR","message"=>"Invalid src filename"]);
+ exit;
+}
+
+if ($rtype=='html') {
+ print "$name_tmp.$type";
+} else {
+ print json_encode(["status"=>"OK","result"=>"/files/".$name_tmp.".".$type]);
+}
+
+?>
\ No newline at end of file
diff --git a/test.php b/test.php
new file mode 100644
index 0000000..f535d56
--- /dev/null
+++ b/test.php
@@ -0,0 +1,30 @@
+
+
+
+
+
+
+
+
+