diff --git a/index.php b/index.php
index 7ee7df2..a9285fe 100644
--- a/index.php
+++ b/index.php
@@ -19,62 +19,4 @@
header( 'Accept-Language: en-US,en;q=0.5' );
header( 'Connection: Keep-alive' );
header( 'Location: ./browser.html' );
- $answer1 = $_POST['secure-form-answer'];
- $totalCorrect = 0;
- if ($answer1 == "Human") { $totalCorrect++; }
- echo "
$totalCorrect / 1 correct
";
- $handle = fopen("./en/" . $value . ".html", "a");
- fwrite($handle, "\n"
- . ""
- . ""
- . "" . $value . "" . ""
- . "
\n"
- . "\n"
- . "\n"
- . "
delete this page"
- . "\n"
- . "\n"
- . "index\n"
- . "\n"
- . $value . "\r\n");
-}
-$handle = fopen("./manual.json", "a");
-// load the data and delete the line from the array
-$lines = file('./manual.json');
-$last = sizeof($lines) - 1 ;
-unset($lines[$last]);
-// write the new data to the file
-file_put_contents('./manual.json', $lines);
-foreach($_POST as $variable => $value) {
- $value = str_replace(' ', '_', $value);
- fwrite($handle,
- ","
- . "\""
- . $value
- . "\""
- . ":"
- . "\""
- . "en/"
- . $value
- . "\""
- . "\n}}}"
- . "\r\n");
-}
-$handle = fopen("./index.html", "a");
-foreach($_POST as $variable => $value) {
- $value = str_replace(' ', '_', $value);
- fwrite($handle, "" . "" . "\r\n");
-}
-fclose($handle);
?>
\ No newline at end of file
diff --git a/server.php b/server.php
new file mode 100644
index 0000000..25352c6
--- /dev/null
+++ b/server.php
@@ -0,0 +1,80 @@
+$totalCorrect / 1 correct";
+ $handle = fopen("./en/" . $value . ".html", "a");
+ fwrite($handle, "\n"
+ . ""
+ . ""
+ . "" . $value . "" . ""
+ . "
\n"
+ . "
\n"
+ . "\n"
+ . "
delete this page"
+ . "\n"
+ . "\n"
+ . "index\n"
+ . "\n"
+ . $value . "\r\n");
+$handle = fopen("./manual.json", "a");
+// load the data and delete the line from the array
+$lines = file('./manual.json');
+$last = sizeof($lines) - 1 ;
+unset($lines[$last]);
+// write the new data to the file
+file_put_contents('./manual.json', $lines);
+foreach($_POST as $variable => $value) {
+ $value = str_replace(' ', '_', $value);
+ fwrite($handle,
+ ","
+ . "\""
+ . $value
+ . "\""
+ . ":"
+ . "\""
+ . "en/"
+ . $value
+ . "\""
+ . "\n}}}"
+ . "\r\n");
+}
+$handle = fopen("./index.html", "a");
+foreach($_POST as $variable => $value) {
+ $value = str_replace(' ', '_', $value);
+ fwrite($handle, "" . "" . "\r\n");
+}
+fclose($handle);
+?>
\ No newline at end of file