summaryrefslogtreecommitdiff
path: root/html/public
diff options
context:
space:
mode:
authorElizabeth Hunt <elizabeth.hunt@simponic.xyz>2024-03-09 17:55:58 -0700
committerElizabeth Hunt <elizabeth.hunt@simponic.xyz>2024-03-09 17:55:58 -0700
commit2c4b0cf6c40d7b866a9c538a4df06bc36e189d89 (patch)
tree253fe37e324af7a8e5359d37e71c3d291beed30f /html/public
parent19649ea71d3c348069afacc460c1bedd5a6788b9 (diff)
downloadtilde.club-2c4b0cf6c40d7b866a9c538a4df06bc36e189d89.tar.gz
tilde.club-2c4b0cf6c40d7b866a9c538a4df06bc36e189d89.zip
setup a 'proxy'
Diffstat (limited to 'html/public')
-rw-r--r--html/public/index.php18
1 files changed, 17 insertions, 1 deletions
diff --git a/html/public/index.php b/html/public/index.php
index eee4f27..3ed5805 100644
--- a/html/public/index.php
+++ b/html/public/index.php
@@ -1,3 +1,19 @@
<?php
-echo "hai :3"
+// todo: startup go program if not started. use low cpu priority.
+
+$ch = curl_init();
+
+$url = "http:/localhost";
+$unix = "/home/simponic/http.sock";
+
+if (defined('CURLOPT_UNIX_SOCKET_PATH')) {
+ curl_setopt($ch, CURLOPT_UNIX_SOCKET_PATH, $unix);
+ curl_setopt($ch, CURLOPT_URL, $url);
+ curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
+
+ $response = curl_exec($ch);
+ echo $response;
+}
+
+curl_close($ch);
?>