diff --git a/readme.md b/readme.md
index 18879ce..054f3b5 100644
--- a/readme.md
+++ b/readme.md
@@ -92,7 +92,7 @@ docker exec -u root -t -i some-app /bin/bash
mysql -u root -p
-
6. Create table meme in appdb database, then allow dbusr to access it
+6. Create table meme and meme_ronaldo in appdb database, then allow dbusr to access it
USE appdb;
@@ -104,6 +104,15 @@ CREATE TABLE `meme` (
`value` TEXT,
PRIMARY KEY (`id`)
);
+
+CREATE TABLE `meme_ronaldo` (
+ `id` INT(10) NOT NULL AUTO_INCREMENT,
+ `session` VARCHAR(20),
+ `status` INT(1),
+ `timestamp` TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
+ `value` TEXT,
+ PRIMARY KEY (`id`)
+);
@@ -133,7 +142,17 @@ pip3 install moviepy
python3 renderDB.py
-10. Open your browser, navigate to http://{your-ip}:8080/meme-generator/
+
+10. Run the second Python script by creating a new screen session, detach from screen by pressing Ctrl + A then Ctrl + D
+
+screen
+
+
+cd /var/www/html/meme-generator/ronaldo
+python3 renderDB.py
+
+
+11. Open your browser, navigate to http://{your-ip}:8080/meme-generator/
External repo
https://repo.gabrielkheisa.xyz/gabrielkheisa/meme-generator
diff --git a/ronaldo/check.php b/ronaldo/check.php
new file mode 100644
index 0000000..c483d84
--- /dev/null
+++ b/ronaldo/check.php
@@ -0,0 +1,47 @@
+connect_error) {
+ die("Connection failed: " . $conn->connect_error);
+}
+
+$sql = "SELECT status FROM meme_ronaldo WHERE session='".$q."' ORDER BY id DESC LIMIT 1";
+$result = $conn->query($sql);
+
+
+if ($result->num_rows > 0) {
+ // output data of each row
+ while($row = $result->fetch_assoc()) {
+ if($row["status"] == "1"){
+ echo "Click here";
+ }
+ else {
+ echo "Processing";
+ }
+ }
+
+
+} else {
+ echo "0 results";
+}
+$conn->close();
+
+
+
+
+
+
+
+?>
+
diff --git a/ronaldo/index.php b/ronaldo/index.php
new file mode 100644
index 0000000..908218a
--- /dev/null
+++ b/ronaldo/index.php
@@ -0,0 +1,183 @@
+
+
+
+
+
+
+
+
+
+
+
+connect_error) {
+ die("Connection failed: " . $conn->connect_error);
+ }
+ /*
+ $sql = "INSERT INTO meme (session, status)
+ VALUES ('". $sesid ."', '0')";
+
+ if ($conn->query($sql) === TRUE) {
+ // echo "New record created successfully";
+ }
+ else {
+ // echo "Error: " . $sql . "
" . $conn->error;
+ }
+ $conn->close();
+ */
+
+
+}
+else {
+ // echo "Cookie '" . $cookie_name . "' is set!
";
+ // echo "Value is: " . $_COOKIE[$cookie_name];
+ $sesid = $_COOKIE[$cookie_name];
+}
+
+
+?>
+
+Meme generator
+
+
+
+
+